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

How do I get this animation to work?

Asked by 8 years ago

I'm trying to make a sword to teach myself how to animate tools and it's-- not going too well. As of right now I'm trying to get an animation to play when you activate the tool and no matter what I try I can't get it to work. How would I fix this and avoid this problem in the future? ;o;

local Tool = script.Parent
local Character = Tool.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local Animation = Humanoid:LoadAnimation("SlashAnim")

Tool.Activated:connect(function()
    Animation:Play()
end)

It's not in a local script-- I know in some tools all the animations are in a local script and I don't know if that means anything ;o

Answer this question