YouTube2Text

[Part3.5] Roblox Combat System for Beginners | Block Animation & Fixes — Transcript

by Senko · 1,090 words · 178 segments · language en · Watch on YouTube

Full transcript

  1. 0:00All right. Uh, this going to be sort of
  2. 0:02like a mini update video. So, it's going
  3. 0:06to be like 3.5 for the whole series.
  4. 0:10This video, I'm just going to like do
  5. 0:11some little small changes to the whole
  6. 0:13system in general, just so we can make
  7. 0:15things easier to change in the future
  8. 0:18videos. So, the first thing I'm going to
  9. 0:20do is fix the issue with the F key held
  10. 0:24thing, which is kind of inefficient in a
  11. 0:27way. So, first off, what I'm going to do
  12. 0:29is get rid of this and change this to is
  13. 0:33typing and digit
  14. 0:35false. Now, we'll do the normal input
  15. 0:38begin
  16. 0:39things. Let's make this underscore
  17. 0:41because we're not really going to use
  18. 0:42this. So, if process then is typing
  19. 0:45equals true return otherwise is typing
  20. 0:49is
  21. 0:51false. Now, if we scroll down here, we
  22. 0:54can get rid of this.
  23. 0:56We can also change this
  24. 0:59to if user input service is key down
  25. 1:04code.f and not is typing then we can
  26. 1:09block otherwise we'll just unblock
  27. 1:13them.
  28. 1:15So play the game a little bit.
  29. 1:21All right. If you block or hold F,
  30. 1:24you'll see that we block. And if we
  31. 1:25start typing, it just stops blocking.
  32. 1:27And if we press F while we're typing, it
  33. 1:29doesn't block again. Only when we are
  34. 1:32actually blocking in the game like
  35. 1:37so. All right. Next thing I'm going to
  36. 1:39do is I'm going to make uh the block
  37. 1:42animations
  38. 1:44work. So in the description, I'm going
  39. 1:46to have linked the animation dummy from
  40. 1:48before, and it's going to be updated
  41. 1:49with block animations. So block idle,
  42. 1:52block broken, which is uh these three
  43. 1:55animations are going to be used in
  44. 1:57today's video, episode
  45. 2:00four. But in
  46. 2:02here in the add state function, we're
  47. 2:05going to add a variable called
  48. 2:08attributes or a parameter called
  49. 2:10attributes and just call it any which
  50. 2:12it's going to be a
  51. 2:13table. And then now before we parent it,
  52. 2:16we'll see if attributes is a thing.
  53. 2:19attributes. Then we will loop through
  54. 2:22the attributes and we'll say new state
  55. 2:25set attribute name, value like
  56. 2:30so. Now we can go to our comma system
  57. 2:33and we can do comma. We don't want to
  58. 2:35have a deration. So we just set that to
  59. 2:37nil. And then for attributes we can say
  60. 2:40weapon name is equal to our found
  61. 2:45name. Like so. Now we want to actually
  62. 2:49play the block animation. So we can say
  63. 2:50playing block
  64. 2:53animation and we'll put this in a
  65. 2:55separate thread. So if it errors then um
  66. 2:58it won't negatively impact the script in
  67. 2:59a way. So we'll say local core folder
  68. 3:02equals
  69. 3:05character.core local animations or
  70. 3:08loaded animations and say equals
  71. 3:13require actually no let's not do this.
  72. 3:17Let's reference all the variables up
  73. 3:19here first. So local core folder equals
  74. 3:23character fun core. If not core folder
  75. 3:26then return end local animations module
  76. 3:29and we can
  77. 3:31say if core
  78. 3:33folder or let's get rid of
  79. 3:36this. Let's say actually no. Okay. If
  80. 3:41core folder and core folder find
  81. 3:43animations then
  82. 3:49No. Okay. Local animations module equals
  83. 3:53core folder find shot animations. If not
  84. 3:56animation module then return end.
  85. 3:59Otherwise we can say local anim local
  86. 4:01loaded animations equal require
  87. 4:03animation modules dot loaded animations
  88. 4:06because remember our all of our
  89. 4:08animations are in
  90. 4:09here. So we can say loaded animations.
  91. 4:13Now we can say loaded
  92. 4:16animations whatever our weapon name is.
  93. 4:18So
  94. 4:19fool.name dot dot
  95. 4:25dot block. So block dot idle play like
  96. 4:30that cuz remember that's how we made it
  97. 4:32to where we can reference animations. So
  98. 4:34we have fist.block
  99. 4:37idle. Now in
  100. 4:39here we can say local we can remove the
  101. 4:42remove state thing local uh blocking
  102. 4:46instance equals status folder. So
  103. 4:48character status find shot
  104. 4:51blocking if blocking instance then we
  105. 4:55can get the to name attribute. So
  106. 4:59local weapon name equals blocking
  107. 5:01instance get
  108. 5:03attribute weapon name. If weapon name
  109. 5:07then and let's destroy it down here.
  110. 5:09Destroy the blocking instance. But if we
  111. 5:11found the weapon name then we can say
  112. 5:12loaded
  113. 5:13animations. Weapon
  114. 5:16name dot dot dot do.block idle
  115. 5:21stop.1 like so. 0.1 is just sort of like
  116. 5:24the fade where if you set it to zero the
  117. 5:28animation like stops abruptly but 0.1
  118. 5:30gives gives it a little bit of time to
  119. 5:32like fade away in a way.
  120. 5:34So, if we play the
  121. 5:37game, we'll see that the blocking
  122. 5:39animation does play like so. And if you
  123. 5:42unblock, it stops
  124. 5:47playing like
  125. 5:49so. Also, what I'm going to do is I'm
  126. 5:51going to add a blocking cool down. So,
  127. 5:54when the player stops blocking, we can
  128. 5:56go to state service add state character,
  129. 5:59comma, no block, comma, let's say like
  130. 6:0204.
  131. 6:04So after the character finishes
  132. 6:05blocking, they can't they have a certain
  133. 6:07thresh threshold they have to meet
  134. 6:08before they can reblock again which is
  135. 6:11the cool down 4
  136. 6:13seconds.
  137. 6:15So let's see. Yep. Over here if we check
  138. 6:18the state and it has no block then you
  139. 6:20can't block.
  140. 6:22So if we play
  141. 6:26again, let me
  142. 6:31block. You see that there's sort of a
  143. 6:33delay before you can block
  144. 6:37again. And
  145. 6:40yeah, that's so the reason we do it like
  146. 6:44this, right, is let's say we have
  147. 6:45another weapon called uh katana in the
  148. 6:48tools.
  149. 6:50If we unequip the
  150. 6:54um the katana or the um the fist
  151. 7:00tool, then the server will check for the
  152. 7:03previous blocking state or instance and
  153. 7:07it'll find the corresponding weapon name
  154. 7:09with it. So we can just stop playing the
  155. 7:11animation. So this and all is compatible
  156. 7:15with many different type of weapons
  157. 7:16which I'll show you in the future
  158. 7:18videos.
  159. 7:21So yeah, that's pretty much all I wanted
  160. 7:23to do for sort of this intermediate
  161. 7:26intermission video. So we fixed the
  162. 7:29issue with the holding F thing while
  163. 7:32we're typing with these lines right
  164. 7:34here. And we added an attributes sort of
  165. 7:39um parameter to the
  166. 7:41state and using that we made it to where
  167. 7:44you can play animations while you're
  168. 7:46bucking. And yeah, that's pretty much
  169. 7:48it. Episode 4 will be released later
  170. 7:51today, which will handle or show youall
  171. 7:55how to do sort of hit types, which if
  172. 7:58you hit the dummy, it'll be stunned. But
  173. 8:01if the dumy's blocking, then it'll have
  174. 8:03like a little um a blocked hit type
  175. 8:06rather than a default stun type. And if
  176. 8:10you hit them with your last M1, it'll
  177. 8:11block pick
  178. 8:13them. And yeah, that's pretty much it.

About this transcript

This page contains the full transcript of [Part3.5] Roblox Combat System for Beginners | Block Animation & Fixes by Senko, generated from the public captions YouTube serves with the video. The transcript has 1,090 words across 178 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.