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.
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.