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

Why Isn't My Animation Script Not Playing The Animation?

So I Am Creating A Menu To Play Animations But It Wont Play. The Character Is R6 And The Animation Was Made With R6. The Animation Is Mine And Is A Local Script In My GUI

Also No Error Appears

Here Is My Script

script.Parent.AnimationControl.Insane.MouseButton1Click:Connect(function()
	local animation = game.Players.LocalPlayer.Character.Humanoid.Animator:LoadAnimation(script.Animation)
	animation:Play()
end)

2 comments

0

On The 2nd Line The Ending Is Cut Off And Only Says script.Anima It Says script.Animation

0

At the local animation = line 2 its empty

1 answer

Suggestions:

Try loading the animation with just the humanoid rather than Animator

Try using player.CharacterAdded() and Character:WaitForChild("Humanoid")

Try going from client to server (like sending the player who clicked to server and then the server plays the animation for the player)

You can also try replacing the local script with a script so that when the button is pressed, it gets character from game.Players:GetCharacterFromPlayer() (since the script is in the players playergui), then playing the animation from the humanoid it gets from the character

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