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

Another Why won't my animation play?

Asked by 9 years ago

Hello! It seems I have absolutely no luck when it comes to Animations. So what I am trying to do is make a ball and chain tool. I have it all built and I have a hurting script in it but I want an animation to play when it is activated. Here is my script.

repeat wait() until game.Players.LocalPlayer
repeat wait() until game.Players.LocalPlayer.Character

Tool = script.Parent
char = game.Players.LocalPlayer.Character
humanoid = char:WaitForChild("Humanoid")

SlashAnim = Instance.new("Animation")
SlashAnim.Name = "toolanim"
SlashAnim.AnimationId = "http://www.roblox.com/asset/?id=218192180"
SlashAnim.Parent = Tool:WaitForChild("Handle")
SlashAnimLoaded = humanoid:LoadAnimation(SlashAnim)

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

The problem is the animation does not play. There is one thing in the Output that I don't understand: Players.Player.Backpack.Ball and CHain.LocalScript:17: ')' expected (to close '(' at line 14) near '<eof>'

0
Nevermind I forgot a ) minikitkat 687 — 9y

Answer this question