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

GUI to change player walking animation?

I have a script that changes the walking animation of a player when they join the game however I would like it so when a player clicks a gui it changes the walking animation rather than the player already spawning in with the custom animation. How would I do this?

Here is the current script I have:

game.Players.PlayerAdded:connect(function(player)
while not player.Character do wait() end
local character = player.Character
local animateScript = character.Animate
animateScript.run.RunAnim.AnimationId = 'http://www.roblox.com/asset/?id=3714190073'
end

1 answer

GUIButton.MouseButton1Click:Connect(function()
	animationTrack:Play()
end)

GUIButton is a textbutton or a imagebutton, you should already have the animationTrack defined

1 comment

0

noice

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