Animation resetting to default position

  1. What do you want to achieve? Keep it simple and clear!
    I made a text button and when you press it a animation with play. The animation is a lay down emote, BUT when it plays it will show the animation BUT then it goes back to the normal Roblox position. I just want the animation to stay in that position. I tried looping it in a script but then it just kept looping where it shows the animation and goes back to normal position.
  2. What is the issue? Include screenshots / videos if possible!
    When I’m playing an animation with a button, it show’s the animation BUT then it stop’s the animation and goes back to the normal Roblox position of the character.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve tried looking on YouTube and etc. So far nothing
3 Likes

Few questions:

Is the animation’s animation priority action?

Is there any other animations you need to worry about or any other code influencing it?

Yes, the animation is set to action.
Some coding is influencing the animation, let me show you. ALSO please tell me why my code doesn’t work for it, while answering why the animation goes back to ROBLOX default position.
Code:

local HandsUpAnimation = game.Workspace.HandsUp
local Humanoid = game.Players.LocalPlayer:Character:WaitForChild("Humanoid")
local PlayAnimationButton = game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui").TextButton
local LoadAnimation = Humanoid:LoadAnimation(HandsUpAnimation)

PlayAnimationButton.MouseButton1Click:Connect(function()
	LoadAnimation:Play()
end)

1st Question: How can I make this code work?
2nd Question: How can I make the animation not go back to the ROBLOX position after being played.

1 Like

is the character cloned anchored and cloned right? You can probably just use the player’s character too if you wanted

What do you mean… I don’t understand…

1 Like

Using the player’s character would probably be better until you find a solution for the clone. Or you can put that animation on a dummy and paste all of the accessories and clothing onto it to replicate the player’s character.

Is your animation looped ? Because there is no “LoadAnimation.Looped = true” in your script, so I assume you set your animation to looped when you exported it. If that is that is the case, then you should probably add “LoadAnimation.Looped = true” in your script to make sure it is looped.

I never looped it in the animator… idk how to do that.

What??? I’m trying to figure out how the animation won’t go back to the ROBLOX default character when the animation done playing.

Also how can I fix the script so it works?
``lua
local HandsUpAnimation = game.Workspace.HandsUp

local Humanoid = game.Players.LocalPlayer.Character:WaitForChild(“Humanoid”)

local PlayAnimationButton = game.Players.LocalPlayer.PlayerGui:WaitForChild(“ScreenGui”).TextButton

local LoadAnimation = Humanoid:LoadAnimation(HandsUpAnimation)

PlayAnimationButton.MouseButton1Click:Connect(function()

LoadAnimation:Play()

end)

Just realized for the animation help I can ask here and the code I can ask in some other channel.

When you edit your animation, on the top, near play animation button, on the right there is some sort of “circle arrow”, click it and then export your animation again.

Okay. Also How can I fix my script so it works?