I'm having problems putting my custom animation into a tool without a handle. Every time I open it, it plays the animation, but when I move a little, it will stop. Then it won't play again. Here is my script for my frontpike (which works fine) :
Tool = script.Parent local player = game.Players.LocalPlayer repeat wait() until player.Character ~= nil local hum = player.Character:WaitForChild("Humanoid") local animation = Tool.Front local AnimTrack = hum:LoadAnimation(animation) Tool.Activated:connect(function(mouse) AnimTrack:Play() end) Tool.Unequipped:connect(function() AnimTrack:Stop() end)
Here is my script for my front timber (has the problems I explained earlier.):
Tool = script.Parent local player = game.Players.LocalPlayer repeat wait() until player.Character ~= nil local hum = player.Character:WaitForChild("Humanoid") local animation = Tool.FrontTimber local AnimTrack = hum:LoadAnimation(animation) Tool.Activated:connect(function(mouse) AnimTrack:Play() end) Tool.Unequipped:connect(function() AnimTrack:Stop() end) I really need this to be solved as fast as possible.
Your problem is most likely occurring because the animation for walking overwrites your custom animation. To fix this, you can make your animstion priority higher.
After the line
local AnimTrack = hum:LoadAnimation(animation)
Try adding the line
AnimTrack.Priority = Enum.AnimationPriority.Action