You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
My goal is, when you press a button an animation will play.
What is the issue? Include screenshots / videos if possible!
Basically when I press the button it won’t play the animation.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Looking on YouTube etc.
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)
No errors in the output and I using a local script. QUESTION: On another script I was making I made a LOCAL script where when you press a key it will make the player’s speed reduce. Will other people be able to see it???
local HandsUpAnimation = game.Workspace.HandsUp
local PlayAnimationButton = script.Parent
local Player = game.Players.LocalPlayer
PlayAnimationButton.MouseButton1Click:Connect(function()
local Anim = Player.Character.Humanoid:LoadAnimation(HandsUpAnimation)
Anim:Play()
end)
local HandsUpAnimation = game.Workspace.HandsUp
local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local PlayAnimationButton = script.Parent
local LoadAnimation = Humanoid:LoadAnimation(HandsUpAnimation)
PlayAnimationButton.MouseButton1Click:Connect(function()
LoadAnimation:Play()
end)
local HandsUpAnimation = game.Workspace.HandsUp
local PlayAnimationButton = script.Parent
PlayAnimationButton.MouseButton1Click:Connect(function()
local LoadAnimation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(HandsUpAnimation)
LoadAnimation:Play()
end)
Ok. Also I know this kind of off topic BUT how can I make this animation not go back to the ROBLOX’s default position when it’s done playing. Like how can I make it never stop and it make the character’s hand in the same position until I press a button?