Hello everybody! I have a script which allows for a custom idle animation while holding a tool. Its quite simple…all you have to do is place the script inside the tool you want the animation for and change the animation ID inside the script to your liking. The only issue im having is getting the animation to stop playing when i move. The idle animation overrides all other animations so im stuck sliding around in my idle animation.
local tool = script.Parent
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/Asset?ID=7413588577" --replace with id
local track
tool.Equipped:Connect(function()
track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Action
track.Looped = true
track:Play()
end)
tool.Unequipped:Connect(function()
if track then
track:Stop()
end
end)
You can do what mathdotrandom said, or you could not animate the legs during the idle animation. The reason why you “slide around” is most likely because the animation of the legs moving overriding the movement animation
Well thee are a number of ways you can do that. One way is to simply change the default animations of your game and set it to add yourself.
You can get all tracks that are playing by doing; Animator:GetPlayingTracks()
You could create and add your own animate script and manually play all the animations. - That’s what I would do but it takes a bit more work.
You could change the animations IDs via script inside the character or fork the animation script and it’s IDs and then change the IDs by hand.
Idk if im stupid or something but i made my animation and put it in my gun, so when i stand still the idle animation works but the second i start walking the left hand starts wiggling really weirdly. is there a way to remove that?