[Finale] Roblox Combat System for Beginners | Showcase & Fixes — Transcript
Full transcript
- 0:00Hey everybody, welcome to the last video
- 0:04of the combat tutorial series. Um, today
- 0:09I'm just going to be fixing a couple
- 0:11more bugs and issues with the combat and
- 0:13then uh going over all the scripts and
- 0:16then playing the game, showcasing it for
- 0:18youall. Um, so basic, so essentially I
- 0:21decided to just open source the whole
- 0:23thing once I hit around 600 subs and
- 0:26we're getting pretty close, which is
- 0:28crazy considering
- 0:30that I've I've just gotten so many
- 0:33subscribers within the past couple
- 0:34weeks. It's been great. And yeah. All
- 0:37right, so the first thing we're going to
- 0:39do is fix this block reaction thing. So
- 0:44you see if we join the game and take out
- 0:47our sword and we hit the D. You notice
- 0:50that the animations kind of bug and of
- 0:53course we get an
- 0:54error. So similarly, the reason this
- 0:57happened is because the animations
- 0:59aren't loaded in yet, which is why we
- 1:02made the hit reactions a part of the
- 1:04characters
- 1:05animations. So we can also just do it
- 1:07for that. So we can go over here
- 1:10to our blocked script and we can look
- 1:13for the blockstroke. So we go to
- 1:15block.reactions blah blah blah right
- 1:17here. So in here we can add something
- 1:20called uh block
- 1:22reactions and then we can add in the
- 1:25folders. So fist
- 1:27uh dagger and sword like
- 1:32so. Now we can just go ahead and drag
- 1:34all these
- 1:35here. So this is for dagger. So we can
- 1:38now go ahead and remove
- 1:40this actions folder and do the same
- 1:42thing for fist and our sword.
- 1:50And then let's go this for
- 1:53sword. And this should be good now. So
- 1:56since we changed the location of our um
- 2:00block reactions, we need to change in
- 2:02the script too. So we can go over here
- 2:04and go to call this character.block
- 2:07block reactions dot whatever our weapon
- 2:11used
- 2:12is dot dot dot and then two string the
- 2:16random stroke like so. And now if we
- 2:20play the game the animation should be
- 2:21fixed. So we go over here equip our
- 2:24sword. Oops. Let's see. Character
- 2:29dot character dot block
- 2:33reactions dot weapon used
- 2:37And then oh right here. So we have to do
- 2:40two string shrug one. So it corresponds
- 2:43to
- 2:44this. And then if we play the game we
- 2:47should be
- 2:52good. As you can see the animation's
- 2:54load now. All right. So now that that is
- 2:58done. I'm just going to go over all the
- 3:00scripts
- 3:01again. So basically just everything from
- 3:04episode one to now.
- 3:07So, first off, I'm going to go over how
- 3:08we organize the workspace. So, let me go
- 3:11ahead and move all of these to um the
- 3:14map
- 3:15folder. So, typically in games, we
- 3:17usually like to organize them in
- 3:19folders. So, we want to prevent any
- 3:21unnecessary extra hanging parts in the
- 3:24workspace in
- 3:26general. So, I made a world a world
- 3:28folder and then I also added effects,
- 3:31hitboxes, live, which are just the
- 3:33characters or the players in the game.
- 3:35and map which contains everything having
- 3:38to do with the
- 3:39map. And now if we go to replicated
- 3:43storage, we also have folders in here.
- 3:46So we have remote events which handle
- 3:47our replicating our VFX, blocking and
- 3:51attacking. We have modules. So our state
- 3:55service which we condensed it into three
- 3:58different functions our check state
- 4:01remove state and add state which
- 4:03previously in a previous video we had it
- 4:06in our systems folder but since we moved
- 4:09it to replicated storage it's accessible
- 4:11from both the client and the server now.
- 4:14So that's good. And we have weapon data
- 4:16just to obviously get what type of
- 4:19damage we want things like that.
- 4:22And let's move over to our service group
- 4:25service which contains pretty much the
- 4:27bulk of the combat
- 4:29system. So we have um let's go over
- 4:32let's go over the simple things first.
- 4:33Our collision handler which just handles
- 4:36the part where we collide with the
- 4:38dummies. So you see that you are able to
- 4:41not collide with the dummies which
- 4:44mentioned in a previous video is for
- 4:46things like getting flung if you dash
- 4:48into something hard enough. So just go
- 4:50through the
- 4:51dummy and yeah so how we did that is we
- 4:54use collision groups. So brief over
- 4:57collision groups again if we go to model
- 4:59and collision groups you'll see the we
- 5:02set the collision groups of everything
- 5:04to players. Well everything as in the
- 5:06character and the dummies. So notice
- 5:08that the characters or the players can't
- 5:10collide with each other which this is
- 5:12checked off like
- 5:14so. And now if we go to our tool
- 5:17handler, this just handles this. So if
- 5:20we play the game and we equipped uh our
- 5:24baton and dagger, this handles the part
- 5:27where we just want to remove any related
- 5:29items to the um the weapon once we clear
- 5:34them all, which you see that all the
- 5:35items get
- 5:36removed. So that's that. And we also
- 5:39added extra checks and things. So, for
- 5:41example, if an item gets added to the
- 5:43backpack, we check for that. As well as
- 5:46if an item's already there, then we also
- 5:48check for
- 5:50that. And next up, we go we're going to
- 5:52go to our comment
- 5:54system.
- 5:55So, I I believe in episode 1.5, we
- 5:59discussed the idea of caching, which is
- 6:02just storing modules in a certain table
- 6:06so we're able to call in them again. So
- 6:08this is much better than doing require
- 6:10script.parent no weapons dot or hit
- 6:14types default every single time we want
- 6:18to just
- 6:19uh call
- 6:21that sort of hit effect that we want the
- 6:24character to be or we want the target to
- 6:27be inflicted upon. So because of that
- 6:30we'll just cache modules like so. And
- 6:32then as you can see down here
- 6:36we are going to attack which we
- 6:39find the cache modules the tool name and
- 6:42we
- 6:44attack. And same thing with blocking as
- 6:46well. And uh once again to note you can
- 6:50collapse certain parts of the script
- 6:52with arrows so you can better read and
- 6:55understand where everything is.
- 6:59And over here in character added, this
- 7:01is essential because we're essentially
- 7:02loading the animations of the character.
- 7:05So when we load them, this allows for
- 7:07our, let's say, our blocked effect that
- 7:10we fixed earlier to play because we're
- 7:12loading the character animations which
- 7:14contain the block reactions, hit
- 7:15reactions, and
- 7:18block. And now if we go over to
- 7:21our weapons, let's go sword for example.
- 7:26And you'll see that okay, we have a
- 7:28function called weapon to attack. And
- 7:30this just allows the player to
- 7:33attack like so. So, let me just go
- 7:36through a brief overview of the script
- 7:38in general. So, obviously, if we want to
- 7:41attack, we need to make sure the
- 7:42character is
- 7:44not having a condition to where they
- 7:47can't attack. So, we use state service
- 7:49for that. And we're checking if the
- 7:50character is attacking, blocking,
- 7:51stunned, or they're just not able to
- 7:53punch. Then we just return end which
- 7:56just stops script prevents it from
- 7:58attacking. And another standard check we
- 8:01have is if tool name let's say the tool
- 8:03name is equal to sword. If sword is not
- 8:06equal to this uh the script's name then
- 8:08we return end. And we also want to find
- 8:11the configuration folder for the
- 8:13tool which is
- 8:16this. And over here, we're just adding
- 8:19in our or we're cycling through our
- 8:23swings and we're playing our
- 8:27animations. And down here, we're using
- 8:29the client effects remote event to play
- 8:32sounds. And right here is just our whole
- 8:35hitbox event. And you'll see that we're
- 8:38we're using the cached modules that we
- 8:40cached earlier up here in the script and
- 8:44calling upon them again to work on our
- 8:46hit types which block
- 8:48break and
- 8:50default. And yeah, so essentially the
- 8:54weapon types are the same across the
- 8:55board. Of course, if you want to edit
- 8:57anything, you can just go in here and
- 8:59like play around with the animation
- 9:00length, things like that. And
- 9:03yeah, so let's go ahead and move on to
- 9:06our hit types, which we have three basic
- 9:09ones. We have default and blocked and
- 9:13block break, which default is handles
- 9:15when the player hits the player normally
- 9:17if they're not blocking or anything like
- 9:19that. Uh blocked obviously for when the
- 9:23target is blocking and block break when
- 9:26the target is being block broken.
- 9:30And now we're going to go ahead and move
- 9:32on to
- 9:34our server script or our um our input
- 9:40script. So if we open the input
- 9:43script, you'll see that this is pretty
- 9:46much uh the bulk of the client side of
- 9:49the combat. Hence why it's around 400ish
- 9:52lines. But here you see our
- 9:54conditionals. We have can sprint, can
- 9:56dash, can
- 9:57block, and our is moving function.
- 10:01And toggle trails is for this. When we
- 10:04play the game and we start dashing or
- 10:06sprinting, you'll see that the trail
- 10:08gets toggled on and we start
- 10:10attacking the trail gets changed to red
- 10:13for our attacking trail. Oh yeah, and
- 10:16another thing we want to note is you
- 10:18notice that the hit box is still um
- 10:21appearing. So way to remove that is you
- 10:23can just go over here
- 10:26to our weapon script. Let's say we want
- 10:29to disable the or make the hitbox for
- 10:31the fist transparent. We can just go
- 10:34right here and just say hitbox clone
- 10:35transparency is equal to one. And that's
- 10:38going to make the transparency for the
- 10:40fist hitbox set to one or invisible. So
- 10:44if we equipped our fist, you notice that
- 10:46we don't have a hit box anymore because
- 10:47we made it
- 10:51invisible. All right, moving on. We're
- 10:54moving back to the script. All right,
- 10:55toggle trails function. We went through
- 10:57that and we have our change idle
- 11:00animation, change run
- 11:02animation, which just goes ahead and
- 11:05changes our idle and run animation based
- 11:06on weapon we have equipped and get dash
- 11:09direction should be
- 11:12self-explanatory stopping our
- 11:15animations. And this is our dash
- 11:17function where we play our animation
- 11:20from our animations module which is
- 11:22right here.
- 11:25and we put the sound as well as doing
- 11:29dashing
- 11:30effects. This is where we do our body
- 11:33velocity where the player actually moves
- 11:35from the
- 11:37dashing. And let's
- 11:39see. All right. So, state handler. This
- 11:42is how we put we wrap this all in a
- 11:45render step method which just updates
- 11:49our speed constantly based on what
- 11:51statuses we have. And to reiterate from
- 11:53a previous video, there's a priority
- 11:56system to Roblox, which once again, if
- 11:58you recall, Roblox reads things from top
- 12:00to bottom. So, if we were to move the
- 12:04sprinting status down here, the
- 12:06sprinting status will override any of
- 12:08the things that we already set up here.
- 12:11So, it's important to understand
- 12:14uh the priority of each of the statuses.
- 12:17So, obviously, stun has a really high
- 12:19priority, so it's going to be at the
- 12:20bottom.
- 12:23And as well as in the state handler in
- 12:26the render step, we are constantly
- 12:27updating the
- 12:29animations. And down here, we're just
- 12:32toggling our attacking and sprinting
- 12:34trails. And now here is our mobile
- 12:37support, which if touch enabled, which
- 12:40is if you're on mobile, we're not going
- 12:42to do anything for now. But if you are
- 12:45on um console, then if you're holding
- 12:49button X, you're going to be able to
- 12:51attack. Otherwise, it's a normal input.
- 12:53If you're on PC, you hold down your left
- 12:55mouse button and you
- 12:57attack. And as for sprinting, we made it
- 12:59to where if you're on PC, you have left
- 13:02shift. And if you're either on mobile or
- 13:05console, you're just going to
- 13:06automatically be able to
- 13:08sprint. And blocking. This is our
- 13:11blocking all the way here. Which
- 13:15similarly to attacking, if you're on
- 13:17mobile, the mobile block and attacking
- 13:19functions are already handled in our
- 13:22controller script right here. But if
- 13:25you're on console, then blocking is
- 13:27button B. And normally on PC, it's just
- 13:32F. And then now finally, let's move on
- 13:35to what we did previously, which is our
- 13:37controller and mobile compatibility.
- 13:41which uh render stepped. So, we want to
- 13:44constantly update the visibility of
- 13:46either the console or mobile frames
- 13:49based on what device you're on. And
- 13:52right here is where we start doing our
- 13:55mobile attacking, blocking, and things
- 13:58of that
- 13:59nature. And yeah, that's pretty much it.
- 14:03The other thing, well the last thing
- 14:04that we did was client effects which we
- 14:06cached all
- 14:07effects and we
- 14:11um we called on the cache modules in the
- 14:14on client event method for the clan
- 14:18effects. So all in all that's pretty
- 14:21much the end of the series. Um I'm going
- 14:24to hop in game and just show you the
- 14:25comment once again. So, a brief shortcut
- 14:29is alt P is for publishing the
- 14:33game. All right, now that I am in game,
- 14:36this is I'm just going to showcase the
- 14:37combo one last time. Let me turn up my
- 14:40volume and equip the sword, dagger, and
- 14:43fist. So, you notice that when we start
- 14:45running, our trails start playing. And
- 14:49if we unequipped and equipped, you see
- 14:51that trails start playing based on what
- 14:53weapon we have equipped.
- 14:56Yes, if we dash, you have some
- 14:58effects. And now let's hit a
- 15:02dummy. And let's set the effects to
- 15:04work. And let's equip our fist, which if
- 15:06you recall, we disabled the hit box for
- 15:10that. You see, it
- 15:17works. If we go ahead and clear the
- 15:19weapons, you notice all the weapons
- 15:21disappear.
- 15:23And let's test out the bucking
- 15:27dummy. And you'll see that the effects
- 15:30work, any
- 15:33rebu. And
- 15:35yeah, and please leave me any
- 15:39suggestions for any series or new
- 15:42content that you want that y'all want me
- 15:43to post, cuz right now I'm pretty drawn
- 15:47on what type of series I want to do for
- 15:49y'all. And yeah, put it in the comment
- 15:51section.
- 15:53So that wraps up the end of this long,
- 15:57not not really long, but sort of a 9 10
- 16:00episode series for
- 16:02uh a basic comment system that you can
- 16:04use in a lot of your games. So yeah,
- 16:07thank you for watching and once again,
- 16:09I'm going to open source this once I hit
- 16:11600 subs. So please leave a like,
- 16:14comment, and subscribe and thank you for
- 16:17watching.
About this transcript
This page contains the full transcript of [Finale] Roblox Combat System for Beginners | Showcase & Fixes by Senko, generated from the public captions YouTube serves with the video. The transcript has 2,430 words across 375 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.