so i'm currently working on a game and i am good at animation but i need to know how to do this properly.
so i got 3 animations Sit(Intro, Not Looped And Pretty Much Sitting Down And Then Plays The Cycle.) Sit(Cycle Or Loop, Then When Player Clicks The Button Again it Plays The 3rd Animation) Sit(Outro, Not Loopeed Getting Up.)
so what i need help with is with a toggable button. pretty much i want a button that plays the intro when clicked and then plays the cycle animation and then when the player clicked it again it plays the outro.
again i suck at scripts all i really know how to do is make doors, proximity prompts that makes the player sit. and other crappy things. so if anyone can PLEASE help me :)

5 comments
i have tried local script and just the normal script and the normal script shows: Players.AlphaRedAnt.PlayerGui.ScreenGui.TextButton.Script:10: attempt to index nil with 'Humanoid' and the local shows Humanoid is not a valid member of Player "Players.AlphaRedAnt"
That's because it should be a local script... Insert the LocalScript in the button.
okay it is a local script but i get this: Players.AlphaRedAnt.PlayerGui.ScreenGui.TextButton.LocalScript:18: Expected 'end' (to close 'function' at line 6), got ; did you forget to close 'then' at line 7?
Just put an end at the end.
i did now i get: "Humanoid is not a valid member of Player "Players.AlphaRedAnt""