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

Is it possible to change a characters animations on the spot?

I have been working hard on my game that ive been working on, and I was thinking of ways to make revenue.

I decided on animations, since I love animating and I thought it would be cool.

So I was wondering if there was a way you could change the characters animations on the spot, like if they were to click a GUI there walk animation would change or there jump animation would change.

For just more info the character is the default R15 Robloxian so nothing special. I am just a little lost on how this is possible or if it even is possible. I know its possible because you can buy taunts on other games on Roblox so it must be possible.

Thank you for your time.

2 answers

✓ Accepted answer

Hello Gotta!

This is very much possible. For more on changing default animations: http://wiki.roblox.com/index.php?title=Changing_default_character_animations

LocalScript in the button:

button = script.Parent
player = game.Players.LocalPlayer

function Click()
    local character = player.Character
    local animateScript = character.Animate
    animateScript.walk.WalkAnim.AnimationId = 'http://www.roblox.com/asset/?id=IDHERE'
end
button.MouseButton1Click:connect(Click)

At IDHERE, put your animation ID. Example here, is a link of the walk animation https://www.roblox.com/library/180426354/WalkLoopAnimation "180426354" is the ID. If you need further help, feel free to ask.

2 comments

0

Thanks a lot man. :) Try to be open to questions because I may have one again at some point. Thanks so much dude :)

0

No problem! I'm in the scripting helpers discord @EddieLJones#5580 if you need anymore help! Also, please upvote my answer to increase my rep on SH.

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