Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help with Animation playing for 2 seconds like normal ;( ?

So I am using the ROBLOX Animation Plugin and I did make my animations already. So the problem is, when you make an animation, it plays for 2 seconds which I don't want. So when the Jump animation is played, it plays for 2 secs. This is hard to explain but what I am wanting is when the player hits the ground I am wanting them to play there normal walk animation.

Clip of what is going on: https://gyazo.com/19f591e40c5f22a5154ea2c36c5c4154

local Player = game.Players.LocalPlayer
local UserInputService = game:GetService('UserInputService')
local JumpAnim = script:WaitForChild('Jump')
local DabAnim = script:WaitForChild('Dab')

UserInputService.InputBegan:connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.Space then

		local JAnim = Player.Character.Humanoid:LoadAnimation(JumpAnim)
		JAnim:Play()

	elseif Input.KeyCode == Enum.KeyCode.Q then

		local DAnim = Player.Character.Humanoid:LoadAnimation(DabAnim)
		DAnim:Play()

	end
end)

1 answer

✓ Accepted answer

You can change the jump animation using the default animation control in the character model this will start and stop the animation at the appropriate times.

*In a local script *

local char = game.Players.LocalPlayer.Character
char.Animation.jump.JumpAnim.AnimationId = "rbxassetid://00000" 

also if you are trying to achieve something else by binding it to Q just add a estimated delay and use :Stop() you can stop an animation and it will return to the lower priority that it has taken priority over.

This discussion is preserved as it was. New answers, comments, and votes are closed.