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

Custom tool animations (idle , running animations)?

Asked by
Dec_ade 47
5 years ago

Does anybody know how to make a tool with a custom idle and walking/running animation when equipped?

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

localScript inside tool:

01local tool = script.Parent -- The tool position
02local player = game.Players.LocalPlayer
03local Equipped = false -- The Bool that will be used later
04local humanoid = player.Character:WaitForChild("Humanoid") or player.Character.Humanoid -- The Humanoid
05local Idle = script.Parent:FindFirstChild('Idle') or script.Parent.Idle-- Your Animation, be sure to put the ID
06local run = script.Parent:FindFirstChild("Run")
07local LoadAnim
08 
09tool.Equipped:Connect(function()
10    if not Equipped and Idle and LoadAnim == nil then
11        Equipped = true
12        LoadAnim = humanoid:LoadAnimation(Idle)
13        LoadAnim:Play()
14    end
15end)
View all 29 lines...
0
check if this works, I spent too much time on it AnasBahauddin1978 715 — 5y
0
Thanks! Dec_ade 47 — 5y
Ad

Answer this question