Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Best way to play a custom idle animation or walking animation?

Asked by 5 years ago

I have been recently looking into animations and how I would overlap roblox's default one with a custom animation. I would like to know what is the best way to do this. What settings should I have in the animation file? Looped? Or use a loop to play the animation?

Normally we probably go get the default animation script roblox provides us and change the Id's. But let's say I wanted to play different animations based on something? For example I have weapons and based on what weapon you have you would have a different idle animation, walking animation and so on. I think making multiple copies of the same script and then cloning them into the player is very in efficient and can cause many bugs.

So, what is the best way to add your own idle animation to a game?

0
Go to roblox studio and Press Play. Copy your animate script and exit the game. Then paste the animate script into Workspace and then you will find a couple of string values as children of the script, Change one of the ID to yours, also go open the script and edit it.. mixgingengerina10 223 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

Case 1

I actually did this in one of my games, what I ended up doing was since I wanted different animations for all the weapons that I had, I made a custom animation script that played animations over the normal Roblox ones, but also along side them.

From the Roblox animator you can check which parts you want included in your animation. This actually allows you to play multiple animations at once. For example, if you wanted to play the Roblox running animation, but you wanted your character to be holding a weapon - in the animation you would uncheck the lowertorso and leg parts of the rig in order to let the Roblox running animation to play along side yours.

In terms of overriding the default Roblox animations, they are all priority Core, which is the lowest priority. I set all of mine to action since that is the highest priority and will play over any animations that are already in progress.

I believe I ended up putting my animation script in the StarterCharacter, however did not replace the default animation script.

For idle/running/walking/constantly playing animations, it is better to have them looped.

Case 2

If all you want to do is change the default Roblox animations, you can hit the Play button, go into the game, find your character in the workspace and copy the script called Animate. From there, exit out of studio and paste it into the StarterCharacter. From there you can change the ids of the animations from inside of the script or in the values outside of it. As long as it's called Animation it will replace the default Roblox script so that it doesn't even load inside the character.

Ad

Answer this question