Animation Scripting Support

OHH THE PROBLEM WITH YOUR CODE got it

local HandsUpAnimation = game.Workspace.HandsUp
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local Humanoid = char:WaitForChild("Humanoid")
local animator = Humanoid:WaitForChild("Animator")
local PlayAnimationButton = game.Players.LocalPlayer.PlayerGui:WaitForChild("Annimations").HandsUp
local LoadAnimation = animator:LoadAnimation(HandsUpAnimation)


local Playing = false
PlayAnimationButton.MouseButton1Click:Connect(function()
	if not Playing then
		LoadAnimation:Play()
	else
		LoadAnimation:Stop()
	end
	Playing = not Playing
end)

Oop I already fixed it, thx tho.

How could I achieve my second goal? Where the hand’s up animation will show the player’s hands going up and it WON’T reset back to normal player’s position?

i think your second issue has to do with ‘Animation priority’ and looping

Hm, my animation priority is action and I’m not sure on how to loop…

you should put

LoadAnimation.Looped = true

under your ‘LoadAnimation’ variable

local HandsUpAnimation = game.Workspace.HandsUp
local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local PlayAnimationButton = game.Players.LocalPlayer.PlayerGui:WaitForChild("Annimations").HandsUp
local LoadAnimation = Humanoid.Animator:LoadAnimation(HandsUpAnimation)
LoadAnimation.Looped = true

Done!

So the animation is looping… but going back to it’s original position. Since it goes to the hand’s up position then returns back to normal position and repeats the same thing over and over.