How to play an animation while tool is equipped?

Howdy!
I want to play an animation while a balloon is equipped. I don’t want the animation to play on the ground when the balloon is equipped but when they are in the air.

I’ve tried changing the Roblox default jump animation but came across a problem.
The problem was that the jump’s animation Id was called !ID! and I couldn’t call that in the script. The !ID! would be underlined red because there is an exclamation mark and I don’t quite know how to come around that.

local tool = script.Parent

tool.Equipped:Connect(function()
	game.Players.LocalPlayer.Character.Animate.jump.!ID!.AnimationId = "rbxassetid//8876152240"
end)
tool.Unequipped:Connect(function()
	game.Players.LocalPlayer.Character.Animate.jump.!ID!.AnimationId = "http://www.roblox.com/asset/?id=782847020" --default id
end)

Screen Shot 2022-03-16 at 9.02.23 PM
I’ve tried looking around Devforum but couldn’t quite find a solution that fitted my scenario.

Here is a visual from Natural disasters as to what I want to achieve.

Thanks!

3 Likes

image

1 Like

Only works when the player is on the ground.

I believe you could loop an if statement that , as long as the player equips that tool, the animation will be playing

You could try to script an play animation script thingy

Or just make sure the animation can be looped

Tried that as well; still didn’t work.

Try this

result:

robloxapp-20220317-0456298.wmv (1.7 MB)

I’ve tried that but only works when a player is standing still. It’s prob something to do with animation priority. I went to make it a new one and this is my first time seeing Action 2,3,4. Do you know which one I should choose? I believe the old animation one was set to “Action”
Screen Shot 2022-03-16 at 10.02.33 PM

1 Like

you can reference it as animate.jump["!ID!"] i think

Choose “action”, you want to make the anim works as an action and not as an idle

1 Like