Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Animations don't work inside of tools?

So I have a tool with a handle part, an animation, and a local script but I am getting upset because the animation never runs. Here is the local script:

script.Parent.Activated:Connect(function()
	local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
	animation:Play()
end)

1 answer

Let's fix your script up a bit.

script.Parent.Activated:Connect(function()
	local player = game.Players.LocalPlayer
	local animation = script.Parent.Animation --assuming the animation is inside the tool
	local animationid = "rbxassetid://"..1234567890
	local Track = player.Character:FindFirstChild("Humanoid"):LoadAnimation(animation)
	Track:Play()
end)

I haven't properly tested this, but sorry if this doesn't work for you. Try to use variables as it makes things easier.

2 comments

0

This unfortunately didn't work, thanks for the help though

0

Have you checked if anything else is stopping the animation from working?

This discussion is preserved as it was. New answers, comments, and votes are closed.