What do you want to achieve? Keep it simple and clear!
I want to fix my idle animation system for my tool.
What is the issue? Include screenshots / videos if possible!
The idle animation plays when I use other tools without idle animation scripts, the only time the idle animation stops is when I unequip whatever tool I have. robloxapp-20250116-1630362.wmv (372.3 KB)
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried changing the animation priorities of different things, this (the idle animation) is set to “Idle” and everything else tool related is “Action”. I guarantee that the idle animation is NOT core, as I have uploaded many different versions to Roblox.
Here’s the idle animation code, I got it off someone else, and they didn’t leave any comments, so this script is kind of confusing for me
The more simple way of cancelling the animation would be to use :Stop() as Redston_block180 stated, on the AnimationTrack. It should cancel all current animations, aside from the default roblox animations.
In the Unequipped function in the script you have to reference the animation that’s running and .Stop it there.
If you want this idle animation to play with only one tool then in the Equipped function put an if check in there to see which tool was equipped. If it’s the tool that needs the animation then play the animation.
I think however, that I need to rewrite the script in such a way that it plays an animation as long as equipped, without the toolnone crap, but I have already tried that to no avail. Does anyone have a spare idle animation script from a game they made that works? Thanks
If you stop the animation when the specific tool is unequipped then it should work. I think the standard idle animation should run then, but if not then play the standard idle animation.
local Tool = nil
local animScript = nil
script.Parent.Equipped:Connect(function()
Tool = script.Parent
animScript = Tool.Parent:WaitForChild("Animate")
animScript:WaitForChild("toolnone"):WaitForChild("ToolNoneAnim")
animScript.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://85680571457660"
end)
script.Parent.Unequipped:Connect(function()
-- neither of these methods work, and i tried switching them around aswell
animScript.toolnone.ToolNoneAnim:Stop()
animScript:Stop()
animScript:WaitForChild("toolnone"):WaitForChild("ToolNoneAnim"):Stop()
----------------------------------------------------------------------------
animScript:WaitForChild("toolnone"):WaitForChild("ToolNoneAnim")
-- i changed the toolnoneanim's ID, but it still didnt work :[
animScript.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://0"
end)