Advanced Roblox Scripting Tutorial #14 - Animation (Beginner to Pro 2019)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
alright yours is effing here back with a brand new video and guys in today's video I'm gonna be teaching you how to make animations so I hope you're excited because it's gonna be a pretty fun one this is like how you make your hand go up and down or how you make yourself you know like kick your legs or whatever you want to make like for example let's say I had like a game where I had to like mine mine this treat okay I know this isn't a tree but pretend it is okay pretend pretend this is a tree okay I wanted to mine this tree alright I need my animation so it looks good right so I have a tool obviously but um yeah anyways so yeah I'm gonna teach you to use the enemy I'm gonna teach you guys how to use animations so let's go ahead and start first things first make sure you leave a like if you enjoy and subscribe if you're new that way you can see more tutorials and also if you don't understand the basic subscripting then you may want to watch my beginner series tutorial first because i explained pretty much everything you need to know about scripting there and then if you just watch on runit Oriels you learn pretty much everything you know anyways but yeah here we go let's go and start alright so first things first we need to actually make an animation so yeah okay so first expression we need actually make our animation and have it so we can put it on our character right but how do we do that okay so there used to be like a plugin you have to install but now I'm pretty sure as a default plug-in which is gonna be the animations right here this is default plug-in if you go to your if you double tap this if it's not open and then go to plugins and then you hit animation editor it's gonna pop this bad boy open right here and it's gonna give you the animation editor okay but you actually need a rig to edit with so what a rig means is you need like a character to edit okay so what you have right here is you have a rig builder so the button beside it and you can spawn in a rig so we're gonna do an ar-15 because that's the most common probably from a character type and we'll do a block rig okay I'm just to give it simple alright so now that we have a rig right here if we spawn that end go ahead and do that and you have your animation editors pop it down here that's a good spot I like it there but now we're gonna go ahead and select the rig and then it says no animations may exist for this rig please create one so we're gonna hit create here and now it's gonna actually set it all up for us they're gonna animate our rig right here and then obviously once they're done animating this guy we can just put it on a regular character and it'll look all good alright anyways also um if you can see up here I have the Moon animator this is like another animation plug-in it's just it's a little bit nicer I mean this is the default one with that roblox gives you so you might as well just use this one but um if you want to get more in animation you can google that and stuff so yeah okay anyways um okay so how do you animate so if you guys have never used a keyframe program or a program in which you use keyframes so if you never edited a video with keyframes or maybe you like you never you know I made an animation and another program keyframes are pretty much the same across all programs I mean not obviously exactly the same but it's the same concept okay but if you've never used it don't work someone explain it for you right now alright so um here's what here's how you use this thing okay so I know it maybe looks a little bit confusing right now but I'm gonna explain everything for you dumb by by the start okay so first things first you have all of your parts right here so what this is saying okay is you have a timeline so this right here where my mouse is this is called the timeline and our animation right now is two seconds long or it doesn't have to be two seconds long but our timelines two seconds long so we can make it all the way to two seconds with lorna if you wanted our animation to be five seconds long we can do you know five right there you see we can do out of five changed out right there two out of five and now obviously let me put that back then just popped it out my bad out of five okay so yeah I'll make a little bit bigger to maybe those fall okay um alright so yeah this is that a five seconds but we don't want to envision that long so I say we need our animation be like one second or maybe like two seconds we'll change it back to two all right so now we have a two second timelines to animate and not use any extra room anything like that so we can see everything good okay so now you understand what the timeline is now how do you actually animate your character okay so I'm gonna show you like the simplest way to do it so okay let's say for example our in our animation okay here's our animation here's what's gonna be okay we see a bird okay it's not gonna be a bird there but we're gonna pretend like we see a bird okay so we're gonna be like wow look at that bird over there right it was actually not a bird okay so we're gonna make our our character's head turn and they're gonna like look and then turn the right and then they're gonna also like point at it okay so it'll look pretty cool anyways that's what we're gonna do it yet so we're gonna kind of arm point and then our head turn a bit okay so first things first we'll start with the head turning so at zero okay move your little slider down to zero so you can make your first frame at zero you're gonna go ahead and click OK and then you're gonna go ahead and add a keyframe okay now oh crap glad that we want to end with the head right so we're gonna click right here on the head okay or down here right and these are all your joints right here these are all your like your body parts right so yeah you're like left leg left torso you know I mean the left or so but like upper torso left upper arm left lower arm left hand yeah I'm saying like so that everything is like in together so it's pretty cool but yeah okay so what we want to do is go ahead and get our get our dummy right here and we're gonna add a keyframe now the reason why we're gonna add a keyframe right here even though we actually didn't aim at anything or even move it yet is because we want to make sure it starts here okay so um you can go ahead and just all you tell you how to keyframe basically the simplest way is you can just basically move it a little bit and then press ctrl-z and it's gonna keep a keyframe down there or you could right click on here right here in the timeline and then it should add key here and add a keyframe for you so yeah what do that okay next we're going to go ahead and move to about point two or point for a little do point for seconds and we're gonna make it look up a little bit and then we're gonna make it look to the right a little bit okay so what that's gonna do is it's actually going to okay it's gonna it's gonna actually like make like this whole rotation we just did but it's gonna slow it down okay that's what an animation is so I'm gonna go ahead and move us back to the front so we were talking on the back and now if I hit play you can see that our characters animated a little bit look he just animated you see his head it turns and looks at the bird over there I was there's no bird that's pretending to be and then we can have a look a little bit and we can also make it turn a little bit more too if you want so we'll put this at 0.75 and I'm gonna make the head rotate to the right a little bit more so it's eyes looking that way right so now if we hit play okay we can see our guy he sees Wow like a bird and then he kind of looks over there for a second now maybe we can make it a little bit longer if you want you can just move this to the right and obviously it'll take longer to animate because there's more time between them so you see it goes a little bit slower if you do that and yeah alright next that's pretty much it again that says literally it that's it's that simple animate you just made the entire head now also one quick thing when you make animations you want to actually set the priority which I forgot to mention but you basically setting priority what it is is it's like here there's a thing right here right but basically what it what it is is it's like let me see priority priority or there okay so little over definition it dictates how an overall animation will be handled in the game so okay so basically it's it can overwrite an animation right and get over an animation or it doesn't have to okay so basically what it means it's like if you want like two animations to run like simultaneously you're gonna want to use a certain priority or if you want it's like over right because like if you didn't set a priority or a year and it was that core which is like the most basic one our animation wouldn't even play if there was like a walking animation which everyone has so you want to make sure you set your fire already like kind of high so I normally just go for action like what we're gonna do is is pretend there's a bird so we'll just do action so it overrides whatever we see or whatever image is happening right now okay so yeah so let's just go ahead and switch that action and I'm actually not sure I'm pretty sure I probably sure selected the key frames before I do this so I'm gonna select them all so I'm gonna click on one click and then shift-click or actually control click wait can you not do that okay I don't know but the priority is already action so we're good actually nevermind alright anyways um now that you see justice that priority make sure you send has action okay since that priority to action all right so now it's going to overwrite the walking animation or like whatever default animation it has so that we would actually see alright next we want to make our arm move okay so if you could look in the look in their little like joints part over here on the left side you can actually see that you have your upper arm a parent of your left lower arm and then a parent of your left lower hand and it makes sense because it's your whole arm right so what you can actually do is actually just click on the top part of your arm and then it all wrote to it together you don't have to actually go like this you don't have to go like hand and then you don't you like that and then if you like that and I'm saying so we don't do that okay so um first things first we're gonna add our keyframe there so I'm actually need to delete this first I don't want that actually I kind of do want that I'm kind of dumb but it's fine alright so yeah we're gonna just go ahead and delete to that because I was idle an accident but we're gonna go ahead and click on our arm okay actually will do the right arm because my left arm is bad actually you know what for the lefties out there we'll do the left arm right feel for the lefties okay um alright so we're gonna go ahead and click on the top of the right arm and then we're gonna just go ahead and drag it up on this red one right and we're gonna make it look up like that a little bit all right and actually we're not gonna do that I'm so dumb I should add a keyframe first okay so first things first actually right-click on this guy alright right click right here and hit add keyframe sorry about that I'm dumb okay and then we're gonna actually make it move up we're gonna move this timeline right here or the the cursor laughs or else it's called but this thing right here the blue thing and then we're gonna drag it over here to our head charts tilting up or we're not really wherever doesn't matter but and then we can just drag it up like there okay so now I dragged it up so now if we hit play again it's gonna run both animations at the same time well it's one animation but it's gonna like play both at the same time rights in a keyframe both so you go and hit play and it goes whoa look okay now it looks a little weird because it just kind of goes up the arm so we should what we should do is actually make it a little bit longer it's a little fast and so I'm gonna what I'm gonna do is I'm gonna drag the keyframe for the arm right this bad boy right here and then I'm gonna move it over farther so that way it last long for that way it's like slower you gonna I'm saying so yeah so I'm gonna do that and then we're also gonna make the arm turn to the right like like see that you see the head goes that way like it's like the birds over there we're gonna make the arm also like look alike I'm sorry click the we're gonna arm also go like Oh like like that okay so how you do that it's pretty simple you just go ahead and click on your arm right once you move I'm gonna move my cursor over here because I want it to take a little while to do that so my arm remember of course over here and then click on the back part of my arm so it all groups together and then just rotate it and there you go there you go all right so now if we go ahead and play again we'll go to the start hit play and look it's like he sees a little guy and now that's a little bit too slow so we can move it back a little bit we're gonna play again so there you go that's it that's literally it I know it isn't the best I know it's not the best animation ever but I mean just cut me some slack okay I'm not the best animator okay I'm not an animator but it's good to know it's a useful skill to have even if you're not gonna be in like a dedicated animator it's still good to know how to do basic animations all right so next so now what we're gonna do what and do is actually explore animation that's it we just we just animated an entire model and now we can put this on any character we want so that's awesome all right so we're gonna do now is we're gonna go ahead and hit file and actually if you want to save it you can't so you want to like save your animation you could but we're kind of we're not going to do that that's too much we would only need a saving current comeback this animation ever probably so we're not gonna save it you can if you want but we're gonna go into export it's okay so we're gonna make it you can actually use it in your game and I am talking so fast I'm sorry but yeah we're gonna make it so you can actually use it in your game alright so we're gonna go ahead and oh okay cancel it sorry actually yeah go ahead and hit file write and then export oh crap file I know we didn't use all to second for the way I know we didn't use all two seconds but you'd only need a needle to take us anyways it's not gonna run it through seconds I don't think but well you know we'll go ahead and put it at the last keyframe here anyways so we'll change that to one point three five zero so that way it's like yes now what that's at the end okay so that way it ends right at the end and it looks nice okay and now also actually one more thing I should mention let me put that back if you wanna like make it go back you can but for this for this tutorial and keep it short yeah I'm not going to do that because it's kind of a lot of work but I mean not really you guys pretty sure you can just reverse the keyframes but okay anyways but yeah alright so now we're gonna do is go ahead and just hit file export okay and then we're gonna actually meet sorry sorry okay put this back to 1.35 or if you're cute if you're keeping with someone else the last keyframe or somewhere else just put it to wherever your last keyframe was okay so mine was one point three five zero so that way it actually adds on one point one point three five zero okay and nannerine hit file export and then we're gonna our file export okay and then we're gonna hit create new okay and we're gonna call this oMG a bird okay so we just saw a bird oMG okay yeah obviously you don't need a name with that if you don't want to you name it whatever you want doesn't matter and then you hit finish and then it's gonna upload animation to roblox won't see it finish and then what you want to do is actually copy this key right here okay so you see that right there you want to actually copy this alright so confidence link so you can actually open the animation okay and then what I'm gonna do is I'm gonna go ahead and paste it and my browser to the left line and I'll drag it over one second so yeah paste it into your browser okay and then come back to it alright and now you're gonna have right here your animation okay alright yeah this is just animation its upward to to roblox alright so now we're going to do is we're gonna double-click this part right here this is like the code for animation so we want to copy that code so that way with that we like whenever we make sure to make our animation in the game it knows what animation to use so go ahead and just click up here and just double tap that and then copy that okay you just already need alright then go back to her luck studio and now we can exit out of this so go ahead and exit out your animation editor cause we don't need it anymore and then you can build your dummy we don't need the dummy anymore good job dummy but your person your time is over and I'm gonna put my output back so it looks nicer there we go alright next now we're gonna go ahead and actually put the animation on our character and have it play okay so how we do that is first of all you tell the play animations in a local script by the way so make sure you have a local script but yeah so don't ever tried any the server script for animations because it won't work so yeah and then you're gonna go ahead and go start okay so what we're gonna do is we're gonna go to starter player start go play your scripts and we're gonna cut we're gonna make a new local script enter in here and we're going call it we're gonna call this script animation handler okay there you go and then what we're gonna do is actually make the animation instance so we're gonna click on this little plus button plus button right there okay and then we're gonna go ahead and type in animation or it's right there so go to animation and now we've put an animation inside of our inside of our animation handler so now we can access it or you can put it wherever you want honestly but it's just pretty simple to keep it there because that way it's just you know it's there alright and then we're gonna we don't need to rename the animation but we're gonna go ahead and do it anyways and we're gonna call it bird that's it just just bird and then we're gonna go ahead and put the animate put the animation ID in okay now you could it you could um if you wanted to just do like like local bird and I'm actually okay we're name it burn animation to keep it clear bird animation local burn animation is equal to local organization II was equal to script bird animation and then you can do burn animation dot animation ID is equal to that but what we're gonna do for this for this sake is just keep it clear alright just put it in your less lines of code and we're gonna go ahead and actually just paste this click on your animation instance and then paste it in there and then it's actually gonna put it as an RB X asset ID and then put that for you too alright so that's what you want perfect alright so now we're gonna go ahead and do is if I can remember we're going to go ahead and sorry alright so now we're gonna go ahead and actually create the or play the animation okay so first things first we actually need our character for the animation as well so we're gonna actually go ahead and get our player so we're gonna do local game local player joking about players stop local player and then when you are humanoid actually to so we're gonna do local char is equal to player character and then we're gonna do local human or Hugh or Hummel are going to call it is equal to chardot human noise okay and now we're gonna do is we're gonna go ahead and actually create the track so it's a little bit weird you have to create the animation track once you have the animation so you can't just like do like bird animation and then play no it's not like that you have to actually create the track so we're gonna do are actually basically what it's doing is actually loading the animation onto the humanoid so yeah alright anyway so we're gonna do local kick or not sorry Nikki our local bird animation track is equal to human dot our : load animation and then the animation which is gonna be bird animation and then boom that's it so now we have that go ahead and finish that off and then we're gonna do kick animation or not alright I'm looking at a reference bird animation play okay that's it so now we need to play it now I'm also gonna put a weight right here after we put this I'm gonna I'm gonna put a weight so I want everything I wanted everything to load so I'm gonna wait one second just up there because this will be loaded in already but I'm gonna put it up here you can put wherever you want or just put it up there because it might load the animation too fast and you won't see it so yeah I'm gonna do that alright and then that should be pretty much it it should play now um so we're gonna go ahead and hit play and see if it works okay okay come on come on oh it worked look you see that okay wait let me put it in a while loop actually we're gonna do while true do wait I'm sorry wait wait 1.35 doll how long our thing was and then play alright you don't do this if you don't want to but I'm putting in a while loop so you can keep seeing it replay but okay here we go alright so there we go and look okay so it's actually not very it stays so okay so you see it's this is animating as well with that DC so it looks a little weird cause like my character when it's like remember era the animations were the beginning my character would have default animations so I'm from a real loss package but as you can see the head is tilting and the arm is moving so it is working thankfully and obviously we want to integrate integrate this with a tool you can so yeah also if the if it's not working III know why and here's why okay so or if it's if it may not be working for you make sure by the way whenever you created the animation or whenever you created like the like the animation editor and then the rig make sure you did r15 like or make sure you did r15 and if you didn't do ar-15 then I'll explain it but if you if you did r6 right and you hit play and then create a rig well what's gonna happen is it's gonna only give you like six things down here because that our six only has six body parts right so uh if you did an r6 animation which you probably should enough and I hope you didn't but if you did it's okay so if you made one of those animations you actually need to make sure that your and your characters in r6 because you made an r6 animation so you need to make sure you load it onto an r6 character okay so if you did do that um you need to make sure like I said you look around through our six character and now as you can see here but my characters on our six character my characters are 15 and hopefully you're just too but if you're a character is r6 okay we just made our r15 information so if your character is an r6 then what you want to do is hopefully my robots you don't freeze but going through your game settings and please please don't crash not right now no no okay work doing it good all right um okay so yeah so what you want to do is actually just go and ring game settings and then whichever you in the a whichever you made the animation for which if you follow my tutorial correctly you made it for our 15 I have an r15 animation you're gonna go into avatar okay and then you're gonna see here it says avatar type alright and then you just hit r6 okay so our R 15 okay so make sure it goes to R 15 if you have a player choice it's gonna be able to it's kind of like if you yeah if you have player choice obvious it's a choice so if your character on roblox is r6 if you have that hanger enabled then it won't the animation won't work but if you make it to AR 15 then it will work okay so yeah I just and that really bad I'm sorry I know those bad but yeah but if I don't know I don't have an artistic animation so it's not gonna work actually if I if I need r6 but look let me go ahead and show you so I'm gonna run in play and look I have look I have I have blocky arms it looks a little weird mom because you know I don't have any other joints I just have my my limbs like my arm left arm left leg you know all that stuff so it's not gonna work animation is not working at all now that's why is because we have an ar-15 animation so it's not gonna work on our six character alright so make sure your animation matches up with your character type but some pretty much what I'm trying to say alright anyways guys I know this long tutorial I'm sorry these worlds have been really long and I'm talking way too fast and I have a speech problem anyways but I hope you enjoyed the video guys if you did make sure to leave a like and subscribe for new that what you done was how in any new roblox script new tutorials and um you know for those of you for those diehard not diehard but those like number one dev King fans I have something special for coming for you I'm just saying I have something very special coming for you so get excited for that if you're if you're a true drifting fan I have something very special coming anyways that's pretty much it I hope you guys enjoyed um if you need questions you have any questions leave a comment or you can go to the discord server discord server link is in the description below so yeah alright guys I'll see the next one peace out
Info
Channel: TheDevKing
Views: 67,682
Rating: undefined out of 5
Keywords: TheDevKing, Roblox Scripting Tutorial, roblox, studio, coding, tutorial, animations roblox, animation roblox, how to animate on roblox, roblox animation editor, how to use the animation editor on roblox, how to make a sword hit on roblox, animation tutorial roblox, roblox animation tutorial, how to script on roblox, roblox studio
Id: tnvlWtuCqUw
Channel Id: undefined
Length: 23min 18sec (1398 seconds)
Published: Mon Nov 11 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.