how to create and play animations in Roblox studio so firstly you need to insert a rig so go to the Avatar tab click on rig Builder and then insert a rig I like to use the arthro avatars but you can pick any from this list oh no actually not Alro I mean uh the uh the blocky blocky of course okay few right okay into the animation editor then which you find in the Avatar tab you then need to select your rig and it's going to ask you to give it a name name but I'm not
really bothered about that right now and then you can start animating so we have the timeline down here and our animation is currently 1 second long starts at 0 0 and it ends at one down here right so this is 1 second along the time frame you can drag the timeline key frame along at the top here and if you want to you can extend the animation by inserting a new value into this text box so now it's 2 seconds long if you want your animation to Loop you want to select this it basically means
when it reaches the end it will play again until you stop the animation and what I'm going to do is I'm going to design a very simple animation now I'm no animator but I can show you how to use it what you want to do is you want to firstly uh if you want your character to be like this with its default position at the start of the animation then you can simply click on the plus and select add all body it's right at at the bottom here you won't be able to see it because
it just goes out of the bounds of the screen but I can see it on my screen it's called add or body so you select that and suddenly you have all these body parts on the left now you can select one of these body parts from this list alternatively you can just click on one and then you can start so what I like to do is I like to keep the Z 0 the start of the animation I like to keep that clean I don't like to edit any of these body parts because if you
do that you won't notice a difference when you change them later on so this is like the default pose I mean perhaps you want your animation to start in a specific manner you want you know if if you're doing a rope animation you do want the player to start by actually holding the Rope so you might want to actually you know set some defaults and and the z0 would be how your animation starts what the default is but I mean let's just imagine I'm making a zombie animation right I'm going to drag the timeline to
one second and I'm going to just move move the arms up like this when you select the arms you want to select the the highest part in the arm so in this case it's the uh what is it what have I got selected here I think it's the upper arm the right upper arm uh yeah left upper arm okay can't get those mixed up okay so left upper arm if you move that all of the other arm parts are going to move with it like this okay but if you select the middle arm okay only
the the the hand is going to move with it so what we've done is at one 1 second we've moved both arms and so what's going to happen between zero and 1 second it's going to smoothly animate to show this change okay there you go so click on play and it just makes the arms move up and at the end of the animation it repeats okay now I know it's set to two seconds but because we haven't got anything going on after 1 second the animation editor is detecting this and it just Loops back so
how do we make it a little bit smoother how do we bring the arm back down a little bit more naturally well we can just go to 2 seconds now and we can bring them back down to normal we can just moove them down like this but I want to return the player to how they were at the beginning so I'm going to take this key frame from Z 0 I'm going to move the cursor to 2 seconds I'm going to paste it in so now what we've got is from 0 to one they move
up and from 1 to two they move back down because we're restoring the player as they were at the beginning so if we click play now it's going to be a lot smoother so that's our animation for you and I mean you can do as much other stuff as you like you can move the entire player's torso by selecting the uh lower torso and just move it like this or sorry the upper torso like this and perhaps you want to bring them up again and you can keep adding as many of these as you like
I mean this animation is going to be crazy looking in a moment because we've got so many different things moving but I'm just going to do it to show you what you can do with the animation editor okay right so let's click on play and see what happens here yeah this is quite a crazy animation but you can see I've done enough to to show you how it works so when you're happy with your animation what you want to do is click on the three dots and then you want to set the animation priority we're
going to set it to action now this means it's going to overrule any other animations which are playing that are casual core animations things like walking um dances Etc because this is a specific action we want it to over overrule uh the movement Idol and core animations so Idol is when you're sat doing nothing and your character sort of just looks around in different directions uh core I think I'm not actually sure what core is okay but it's it's handled by Roblox um and movement of course when you're moving so do you want the action
if if it's an action animation it will override any movement animations so if you're holding down W ASD Keys you're moving if it's an action it's going to over Ru and play over those animations but if you don't animate a specific part for example we've not animated the legs then I think the legs will still animate as per the movement idle or core animations so you might just want to have a key frame set up at zero keeping them in their default position uh but anyway let me show you how to publish the animation so
you click on publish to Roblox and then this will bring you through the flow that publishes your animation okay it's going to ask you to give it a title description you don't really need to give it a description asset category you want to set to animation and Creator now this is sort of important if it's a game that you own yourself just set it to me um alternatively if it's under a group and you have other developers I'd recommend setting the Creator to be the group just because some times other players can't see the animation
animations are quite strange in that even if you've created the animation only you can see the animation when it's playing at least until it's moderated that is um there's definitely been a few issues in the last couple of years where you're taking the animation ID and it's not working because it's made by another player so I'd recommend always publishing it under a group that you own or a group which you work with and you have development permissions or just publish it as yourself then click on Save and you'll find this animation ID now if you
don't see this go onto the Roblox create page and find it under animations you'll find the ID but you want to copy this animation ID this is really important because it's going to help us in playing the animation so let me show you how to now play an animation so we're going to I'm going to show you how to do it for a normal player and also an NPC so we are going to insert a local script and we're going to say um local well actually what we'll do is we'll do it in a server
script okay we'll do it in a server script and I'll explain the difference in a moment if we just close down the animation editor and we insert a script let's just do it on our NPC to begin with so all you need to do is say well firstly we need to set up something called an animator and so we're going to say local animator equals instance. new animator animator do parent equals rig Doh humanoid has to go inside a humanoid and then we'll say animator colon load animation and what you need to do is you
need to create an animation object like I've done here okay so what we'll do is we'll just delete this and I'll show you again so we click on the plus you click on animation and then you paste that animation ID in there okay and it should turn into to an RBX asset ID then we can reference the animation object by saying script. animation or wherever the animation is and then you'll say C on play like this now I'm just going to do a 2 second delay here so you can actually see things unfold at the
top of the script and then if we click on run wait two seconds the animation is playing and it's also looping so that's how you do it for an NPC let me now show you how to do it for a player and obviously we need to firstly get the player so we can do this in a local script for our own player okay if we do it for our own player it should replicate to other players so if we just do a task. we in this script and that should be all good I think let's
just give it a go let's insert the animation into our local script as well click on play here and we'll wait a few seconds and there we go I'm also playing the animation and let's see it doesn't seem to have replicated or maybe it doesn't play in studio I'm not sure however if you did want to be totally sure you could just play this on the server so that is how you play animations in Roblox if you found this video useful please let me know if you have any more videos you'd like me to cover
also let me know don't forget to subscribe and I'll see you in the next one