#Animation bugs

1 messages · Page 1 of 1 (latest)

mossy copper
#

The animation the rig plays is the animation I want the player to play, but the animation well, doesn't quite do that when I play the animation on the player. Can someone tell me if it's to do with the script?

if templateSword and templateSword:IsA("BasePart") and
                           templateLimb and templateLimb:IsA("BasePart") and
                           playerLimb and playerLimb:IsA("BasePart") then

                            
                            local existingPlayerSword = character:FindFirstChild(SWORD_PART_NAME)
                            if existingPlayerSword then
                                existingPlayerSword:Destroy()
                            end

                    
                            local clonedSword = templateSword:Clone()
                            clonedSword.Name = SWORD_PART_NAME
                            clonedSword.Anchored = false
                            clonedSword.CanCollide = false
                            clonedSword.Parent = character


                            local D = Instance.new("Motor6D")
                            D.Parent = character
                            D.Part0 = playerLimb
                            D.Part1 = clonedSword

                            
                            D.C0 = templateLimb.CFrame:ToObjectSpace(templateSword.CFrame)
                            D.C1 = CFrame.new()

                            D.Parent = playerLimb

                            D.Parent = character

this is a snippet of the script that attches the a clone of the tool that the rig is holding the the player's arm

bronze flame
mossy copper
#

yes

#

wait

#

can you tell me what you specifically mean by that

bronze flame
#

adding the motor6d instance to the arm and connect part0 to weapon and part1 to arm

mossy copper
#

i set the part0 to the arm and then part1 to the weapon and then repositioned the weapon to be correct. also there's a snippet of code i should also include. wait a sec

#

wait

#

no its already there

grizzled flare
#

im struggling with understading what you just said. Could you repeat it?

mossy copper
# grizzled flare im struggling with understading what you just said. Could you repeat it?

Yeah, sure. so i'm trying to make my player play the same animation as the rig is playing, but when i try to do so, what you can see in the video i provided happens. i was wondering if you could tell me if it has something to do with my script i provided which is a snippet of a larger script which gives the player a custom noob avatar i made as you can also see in the provided avatar

bronze flame
#

When the code ran, does the motor6d properties match the one in your animation rig

mossy copper
#

wait

#

i think one cframe might be off

#

wait a second

#

sooo

#

it's

#

still slightly off

#

somewhat closer

#

but slightly

#

off

#

and also

#

how would i fix this

#

i don't see any flaws in my script

#

it seems to be mirroring the cframe instead or something

bronze flame
#

Provide a screenshot of the motor6d's properties on the animation rig and the one in your character

gentle horizonBOT
#

studio** You are now Level 10! **studio

mossy copper
#

ok

#

left one is rig

#

right one is player

bronze flame
#

player's motor6d C1 property isn't matching with the rig

mossy copper
#

yea

#

i know

#

i just

#

don't know what's wrong with my script

#

it seems to be mirroring it?

#

wait

bronze flame
#

just copy the rig's motor6d c1 into the players c1

mossy copper
#

its kinda off

bronze flame
#

c0 and c1 properties must be matched equally

mossy copper
#

im pretty sure they're matched now

#

isnt - 180 and 180 the same

#

when i set it to 180 it just defaults to - 180 anyways im pretty sure its the same

mossy copper
restive crypt
#

change Motor6D to motors to match the one in the animation