HOW TO Make BASIC COMBAT in ROBLOX STUDIO (SUPER EASY TUTORIAL)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome to how to make a combat system in Roblox Studio this combat system will be pretty basic something like bloxer King Legacy this type of game so basically what we're going to have here is just a combat where we can punch people and they take damage you know all that's the good stuff so without further Ado let's get into the video so I hope that you already have a place in Roblox Studio open if you don't go ahead and open one and then right now we're going to create a part we're going to make actually we're going to insert a character first you can do this with um a rig Builder but I but I want to use in animator because I feel most comfortable with that character preset actually we'll do my character we make this R15 and there we go and now let's see now we let's position the part slightly in front of the the player and let's resize it scale six is good okay we want to be a little bit on them too we be a little bit this seems good should make another good it's like a good size and let's go ahead and change this to Glass force field force field let's make the color red there we go now we have our little hitbox template let's go ahead and name this hitbox and actually this add a weld in here add a weld let's see part one is this let's let's go ahead work this part two is this humanoid Ro part we going want the seeo the position this see Z okay Z1 negative 85 okay going to do8 I'm going to do Point actually do 75 okay want 75 as the C they can hit a little bit behind themselves nothing too crazy hitbox template we're going to make a folder and call this um assets we're going to add the hit box actually first let's remove this just and let's just name them let's see name this hit boox hit boxes and let's make this combat box okay and now we can start so let's go ahead and insert a tool go ahead and turn can be dropped off and requires handle off you don't need those go insert a script I'm going to start writing this so first we need to check if tools equ local local tool script. par okay so we need to get the tool tool equal script. par and we need to get the equip value local equip equals false okay this means to the tool be equipped let's go ahead and rename our script though to combat Handler and rename the tool to combat okay so now let's make some more functions let's see bral combo is equal to one let's see [Music] bral M1 punch is to True want them be able to punch V Max combo is equal to three yeah three let's see what other variables do we need you have combo C punch Max combo okay that's all equipped okay let's do tool. equip connect function and then equi true because this means that it's equipped but then tool. unequip means that we said equip Factor bals now we do tool. activate this means that whenever the player clicks this will event will fire and so we can see if C to and this basically says that okay if we cannot punch we want to end this we don't want to continue with the script let's see C punch is to false we want to say the c c punch is equal to false so let's see let's actually make a function called local function compal function set comp combo reset combo reset if combo let's put C if combo if combo is equal toal to Max combo then C is the one else c 1 Z plus 1 okay so this basically says if the combo is the same as Max combo three then we want to set back to Max combo actually we're going want to do this task. delay want them to wait like a second the a function can find true let's see wait this is weit one one wait one task. we one okay wait this wait don't Bel true three can put false okay so this going to be the combo handle okay let's see now let's see we actually need animations though okay let's go ahead wait local hit box game replicate St game p get service replicate storage do hitboxes combat hitbox look go hitbox directory number going create Hit boox local hitbox equals hitbox viory hitbox p is to waterace let's make a variable characters to experence hitbox well part part one is to the character that okay then we so we're going with to set hit box to can touch can touch is equal to false say can't collect def F too okay say let's see yes let's see Tas out wait1 yeah box gu canp true test our weight 25 box FSE combo reset want combo reset we don't actually need the C variable I just realized that combo reset there we go okay so let we have all this it seems that there is [Music] something oh yes com BR is one there we go so let's go ahead and test this to see if it works okay combat it should create one in front of us it does not work do we have an error let's see it's not working I'm clicking it's not working let's check the script Let's see we really didn't e the equipped value oh it's supposed to be if can punch is equals to false because we we want them to be able to punch if they can punch you know okay has an error on my part okay so here we go combat and it creates one right in front of us this is very good okay very good but if we click again if we keep clicking we can spam it this is not good okay we don't want this we don't want to just be able to you know spam click it so what we're going to do is we are going to delete it right this F it destroy like that and so the combat is like 90% done right now it's just missing let's see it's just missing I say a % done see now we can click it it has a cool down so we can't like spam it you know nothing too crazy nothing to crazy now we just need to actually see now now we actually need to add a function Right add function hit box. touch connect if you ever made a kill break before you know what we're about to do hit local humano go hit if humanoid intering see if there even is a humanoid if humanoid is equal to character then in humanoid you this for whatever you want I'm going set 10 right now and go actually test on the D um here we go SP name is equal to okay let's see this Tak Vier Health display went damage okay so we're going to try damaging the dummy now let's go over to our friend hello be have the combat and me see he actually takes damage okay so see what happened is he just took a bunch of damage but we only said to 10 so this is because the hit boox is reging registering that it hit him multiple times so what we can easily do to fix this watch this watch this local Hit List is equal to this okay humanoid humanoid okay wait watch this if hitless par then to True okay so now I put equals true okay so what this does is basically says if they are inside The Hit List they cannot get hit again so this going to help us fix any bugs okay here we go let's test again see he actually does take damage there we go there we go this is really cool he actually does take damage see actually turns with us hbx turns with us it's really good it's like I feel like you jump can hit him okay spin around we can hit him it's a lot of cool things you can do with the combat Okay so now what we're going to do this is optional the comat is already finished this is optional but we can actually add some animations let's go ahead publish this game comat test and let's make some animations okay let's going to add another folder called animations actually no yes I folder inside the combat Handler called anination and then add an animation and col this one okay now that you have all three of your animations or however many you have go want to create a folder like I said and put all three animations in there I'm going to write some more code let's see yes script the animation animations local ulation character know that animated don't get animated load animation anation going wait for combo okay and then animation um play I want to play that animation so let's test it to see if it works now it works combat is done put inside your games now really simple combat let's see let's see it work yes it plays animations let's go so and punch punch and kick let's go see your D punch punch kick here we go punch punch kick so yeah that's pretty much the entire combat thank you all for watching and I'll see you guys at the next video goodbye
Info
Channel: Hyperion
Views: 5,141
Rating: undefined out of 5
Keywords: roblox, roblox studio, how to make a combat system, roblox studio tutorial, how to make a combat system roblox studio, easy tutorial roblox, roblox studio tutorial 2023, roblox studio basic combat, roblox studio basic combat system, how to make basic combat roblox, how to make a combat system in roblox, how to make basic combat roblox studio, how to make combat system in roblox studio, how to make combat animation in roblox studio, how to make combat system
Id: aQCa3pWvX30
Channel Id: undefined
Length: 17min 48sec (1068 seconds)
Published: Thu Jan 25 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.