Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't this Animation Working?

Asked by
woodengop 1134 Moderation Voter
9 years ago

I've created a tool and when I equip it, it doesn't run.

function Animation(left,right)
    left.CFrame=CFrame.new(1,1,1)*CFrame.Angles(0,0,math.rad(-30)) -- Nothing big, just arm test
    right.CFrame=CFrame.new(1,1,1)*CFrame.Angles(0,0,math.rad(30))
end

script.Parent.Equipped:connect(function()
    local chr=script.Parent -- the character(tool's parent)
    left_arm=chr:WaitForChild'Left Arm'
    right_arm=chr:WaitForChild'Right Arm'
    Animation(left_arm,right_arm)   
end)

f.y.i. Nothing in the output,Not Running.I don't know anything about Custom Animations.

1 answer

Log in to vote
1
Answered by
Mystdar 352 Moderation Voter
9 years ago

Line 07, chr is set as the tool not the character, you need,

script.Parent.Parent

, tell me if you still have errors.

Ad

Answer this question