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

We've been searching for hours how to make a Tool Idle Animation. Does anyone know how?

Asked by 4 years ago

Can anyone help me? Me and my partner have been searching for hours and we still dont have a solution. We need a idle animation script that plays when you equip a sertain tool. We have tried many diffrent scripts but none worked.

0
Tool.Equipped:connect(function()animation:play) xXmacerofXx 29 — 4y

1 answer

Log in to vote
1
Answered by
To0_ny 141
4 years ago
Edited 4 years ago
local player = game.Players.LocalPlayer

repeat wait(1) until player.Character

local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local animation = Instance.new("Animation")
animation.Name = "Idle"
animation.Parent = script.Parent

animation.AnimationId = "http://www.roblox.com/asset/?id=" .. "123456789"-- id

local animtrack = humanoid:LoadAnimation(animation)

script.Parent.Equipped:connect(function()
    animtrack:Play()
end)

script.Parent.Unequipped:connect(function()
    animtrack:Stop()
end)

put it in a local script and put the local script in the tool, however, the second you move it does not play anymore, you might have to play around with it. make sure to put your animation id in where there is a bunch of numbers.

Ad

Answer this question