So basically I was making a mmorpg game like sword burst 2 but it's a village with Dragon, I was trying to make a Animations in a Tool like running animation while holding it and idle and so much more but there's a problem cause it doesn't seem to work i copied a tutorial on YouTube here's the link (https://youtu.be/jr6dRmaj6xI) but it doesn't seem to work i tried everything, If anyone could help me please reply here asap, Thank you!
✓ ANSWER ACCEPTED
Problems with Animations in a Tool doesn't seem to work?
2 answers
✓ Accepted answer
TO play an animation, you need to load it into a humanoid. I didn't bother watching the video you showed, so if this isn't what you're looking for, then welp.
local player = game.Players.LocalPlayer
script.Parent.Activated:Connect(function() --//Plays the animation every time a player clicks with the tool equipped
local anim = player.Character.Humanoid:LoadAnimation(script.Parent.Animation)
anim:Play()
end)
Basically, to play an animation you do:
local player = game.Players.LocalPlayer
local anim = player.Character.Humanoid:LoadAnimation(script.Parent.Animation)
anim:Play()
1 comment
0
on idle animation tho? i have this at idle animation
local Tool = nil
local AnimScript = nil
script.Parent.Equipped:Connect(function()
Tool = script.Parent
AnimScript = Tool.Parent:WaitForChild("Animate")
AnimScript:WaitForChild("toolnone"):WaitForChild("ToolNoneAnim")
AnimScript.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://5283297823"
end)
script.Parent.Unequipped:Connect(function()
AnimScript:WaitForChild("toolnone"):WaitForChild("ToolNoneAnim")
AnimScript.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://"
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
Can you please provide your code, so this question doesn't get moderated
I can't answer the question without code to start off with.
I can't answer the question without code to start off with.
I can't answer the question without code to start off with.
Sorry, that was a glitch.
Can you please accept my answer if it works? It said you did, but I didn’t get any rep
yes it works but idk how do i add a running animation into it I'll send the code in an hour sorry