Hello, i am relatively new to Lua (so far ive been scripting from a bit of c# knowledge made into lua and alot of tutorials) and i am currently making a game where you can morph into diffrent characters from various games. The problem is, some of them are pretty unique so the default animations dont work. I wanted to make it so that when you click the "Select" button on the character selection GUI that it also changes the player animation to my custom animations, but i cannot find anything other than changing default animations. If anyone could give me some "directions" to achieving this, or any articles/sites with something like this, it would be very appreciated. Thank you in advance and have a nice day :)
extra info if needed; i have searched many internet sites and googled various things but i cannot find anything like what i need, only how to change default animations that dont variate based on scripts/GUI buttons
You can change animations inside of the "Animate" script found in the LocalPlayer's character.
The content varies depending on your rig type, (r6 or r15), but you can just look around inside of it depending on your rig type.
You can find a bunch of values named "Run", "Walk," etc.
Inside of each value, there is an Animation instance. Just change the AnimationId property to your animation's id and you're good.
You can fire this from a GuiButton by using
local btn = pathtobtn btn.MouseButton1Click:Connect(function() --code end)