YouTube2Text

[Part6.5] Easy Roblox Combat System for Beginners | Episode 6 Summary & Minor Additions — Transcript

by Senko · 1,589 words · 287 segments · language en · Watch on YouTube

Full transcript

  1. 0:00All right, welcome to 6.5.
  2. 0:05Little intermission between the seventh
  3. 0:07episode and the sixth one.
  4. 0:10So, last episode, it was honestly really
  5. 0:13kind of a mess. So, this episode is
  6. 0:15mainly to
  7. 0:16have some little additions and some
  8. 0:18fixes,
  9. 0:19as well as reiterate on what we did in
  10. 0:23the previous episode to hopefully make
  11. 0:25it more concise and have a better
  12. 0:27explanation for it.
  13. 0:28So, yeah, let's get into it.
  14. 0:31So, the first thing I want to address is
  15. 0:34the state service.
  16. 0:36So, you'll notice last episode, we have
  17. 0:39a lot of these
  18. 0:41if and or statements over here that we
  19. 0:43could definitely condense into like a
  20. 0:45different
  21. 0:47state service that we can access. So,
  22. 0:50we're going to move the state service
  23. 0:52from
  24. 0:53the service script service to the mouse
  25. 0:56rules, like so.
  26. 0:58And here, we can keep it the same.
  27. 1:01And one thing we want to add is the run
  28. 1:04service variable in here.
  29. 1:07So,
  30. 1:08basically, when we created the folder
  31. 1:11for the status folder,
  32. 1:13we don't want the client to be creating
  33. 1:15this. We only want the server to be
  34. 1:17creating this.
  35. 1:18So, we can say something like if
  36. 1:21run service is server, then we create
  37. 1:23it.
  38. 1:25Otherwise, we'll just return and
  39. 1:29so, we'll just end the script because we
  40. 1:31only want the status folder to be made
  41. 1:32on the server if there's none.
  42. 1:34So, that's going to be the first
  43. 1:36addition.
  44. 1:37And the next one is actually changing
  45. 1:39every
  46. 1:41variable we created for a state service
  47. 1:43to the new parent.
  48. 1:45So, if you press control, shift, and F,
  49. 1:48you can view all of the locations that
  50. 1:50you put for it.
  51. 1:52So, we can look up state service and
  52. 1:53we'll see all of the places we have.
  53. 1:56So, the first place we'll look is the
  54. 1:59combat system,
  55. 2:01which we know that is a script up here.
  56. 2:04We'll just change this to modules
  57. 2:06{dot} state service, like so.
  58. 2:10So, that should be fixed for that.
  59. 2:12And then, let's see what else.
  60. 2:15Over here, we'll also change this to
  61. 2:17modules {dot} state service.
  62. 2:21Like so.
  63. 2:23Let's see what else right here.
  64. 2:28Modules {dot} state service and
  65. 2:33over here.
  66. 2:35Modules {dot} state service, and that
  67. 2:37should be it for that.
  68. 2:42So, if we exit out all of these scripts
  69. 2:44and we
  70. 2:47play the game,
  71. 2:48let's see
  72. 2:50what happened here.
  73. 2:52Character is not a valid member of
  74. 2:56Duh, duh, duh.
  75. 2:57Let's see
  76. 3:00what this is. Oh,
  77. 3:02this was moved to configuration for some
  78. 3:04reason. We always want it to look like
  79. 3:05this.
  80. 3:07And now, if we play the game,
  81. 3:09everything should be running fine.
  82. 3:12And if we let suck, you'll see that it
  83. 3:14works.
  84. 3:18Everything should be working fine.
  85. 3:23There we go. Like so.
  86. 3:27All right. Um, so, next thing we want to
  87. 3:29do is
  88. 3:32implement the new state service add-on
  89. 3:34into the input script.
  90. 3:39So,
  91. 3:43we will do that.
  92. 3:46So, over here, we can require the state
  93. 3:48service. So, we can say
  94. 3:50state service equals require
  95. 3:52modules.state service.
  96. 3:55And then, instead of doing all of this
  97. 3:57like extra things, we can just say
  98. 4:00if state service.check state, character,
  99. 4:03{comma} let's say
  100. 4:05stunned, blocking,
  101. 4:09attacking,
  102. 4:10no sprint,
  103. 4:12no move, dashing,
  104. 4:15that's cool down,
  105. 4:16then we just return false like so.
  106. 4:19I will leave it at that. And we can do
  107. 4:21the same thing for here.
  108. 4:24So, we can say stunned, blocking,
  109. 4:26attacking, no sprint, no move.
  110. 4:31And there we go, like so.
  111. 4:36And if we do that,
  112. 4:39there we go.
  113. 4:42And now, let's see if there's any other
  114. 4:44places that we want to do that at. Let's
  115. 4:46see.
  116. 4:49Nope, that'll be fine.
  117. 4:52And okay, another thing we want to do is
  118. 4:54we want to fix the
  119. 4:58Well, I want to reiterate what we did
  120. 5:00for the idle, the run, and things like
  121. 5:02that.
  122. 5:04So, first things first is that we want
  123. 5:06to remove previous idle cuz in previous
  124. 5:09run cuz we're not We're not using that
  125. 5:11anymore cuz if you see that if we press
  126. 5:13Ctrl F and look it up, the only places
  127. 5:16that we have it are in the function.
  128. 5:17We're not We're not calling the same way
  129. 5:19we were else.
  130. 5:21So, we can just remove this and we can
  131. 5:25remove this.
  132. 5:29Remove this and remove this, like so.
  133. 5:33And if we go down here to change idle,
  134. 5:36we look it up.
  135. 5:38And let's see. All right. So, let's
  136. 5:42start from the place where we actually
  137. 5:44started playing the animation so I can
  138. 5:45hopefully explain it for you.
  139. 5:48So, right here, we we're checking if the
  140. 5:51player is either jumping or in the air
  141. 5:53or anything like that.
  142. 5:55If that's the case, then we want to stop
  143. 5:57all of the idle and run animations cuz
  144. 5:59we don't want them playing.
  145. 6:01The same thing with when the player is
  146. 6:02dashing or the player is at the end of
  147. 6:04the dash. You want to stop that.
  148. 6:07So, the reason return works in this case
  149. 6:10is because we have it in a different
  150. 6:12thread, which I mentioned in the first
  151. 6:14video in the series, I believe.
  152. 6:16So, threads basically just create a new
  153. 6:19a new parallel for the script to run at.
  154. 6:21So, if you do return, it's only going to
  155. 6:23return the whole thread. It's going to
  156. 6:25stop the whole thread from running, not
  157. 6:26the whole script.
  158. 6:29So, over here, we commented the idle
  159. 6:31section.
  160. 6:33So, if the player is moving, then we
  161. 6:35want to stop all the idles
  162. 6:39because that just makes sense.
  163. 6:41Otherwise,
  164. 6:43if the player isn't moving, we want to
  165. 6:45stop all of the run animations. And we
  166. 6:48want to check for the new idle the
  167. 6:50player has.
  168. 6:52And we're going to loop through all of
  169. 6:53the idle animations and stop all the
  170. 6:56ones that aren't that isn't the current
  171. 6:58idle that we have.
  172. 7:00And then, of course, we want to play the
  173. 7:01new idle.
  174. 7:03And then, moving on to the sprinting
  175. 7:04section,
  176. 7:06we're checking if the player is moving
  177. 7:08and we're sprinting at the same time.
  178. 7:11If those if that condition or those two
  179. 7:13conditions are fulfilled,
  180. 7:15we will stop the idle animation and we
  181. 7:17will check for the run
  182. 7:20or change run.
  183. 7:22So, you see that we initialize a
  184. 7:24variable called return table, but we're
  185. 7:26not using it anymore, so we can just
  186. 7:27remove that and just change it to change
  187. 7:29run like so.
  188. 7:31And the same thing over here.
  189. 7:33Just remove that.
  190. 7:36Now,
  191. 7:37going back to this, we are doing the
  192. 7:39same thing similar to the idle
  193. 7:41where we're checking for all the runs
  194. 7:43that that aren't named to the current
  195. 7:45run value
  196. 7:47and we're stopping those.
  197. 7:48And then otherwise, we're just going to
  198. 7:50play the new run
  199. 7:52animation.
  200. 7:54And if the player is not moving and
  201. 7:56they're not sprinting, we just stop all
  202. 7:57the running animations like so.
  203. 8:00And that is the condensed version,
  204. 8:03hopefully an explanation of how we did
  205. 8:05the idle and sprint animations.
  206. 8:10And yeah.
  207. 8:13So, if we play the game
  208. 8:18you'll see that all of our new state
  209. 8:20services are added
  210. 8:22using the shared state controller that
  211. 8:24we see in
  212. 8:26modules.
  213. 8:37All right. So, you'll notice that the
  214. 8:39animation is sort of
  215. 8:41causing the player to just flail their
  216. 8:42arms in the air.
  217. 8:44So, in order to fix that, we can just
  218. 8:46add a check statement right here
  219. 8:49that's checking if the player is
  220. 8:51dashing. So, we can say
  221. 8:53if state service that check state
  222. 8:55character comma dashing, then return.
  223. 8:58Or instead of say saying return, we can
  224. 9:01say else.
  225. 9:03Or
  226. 9:04scratch that, we can say if not state
  227. 9:05service that check state character comma
  228. 9:07dashing
  229. 9:08then remote set up fire server.
  230. 9:13We can also add on to this, we can say
  231. 9:14if they're not blocking, if they're not
  232. 9:17attacking
  233. 9:19then we can do all of that. And if
  234. 9:21there's no dash and lag, then we can do
  235. 9:22that, too.
  236. 9:24And lag, I believe, is what we called
  237. 9:26it.
  238. 9:28Yeah.
  239. 9:29And lag with a lowercase L.
  240. 9:32Like so. So, this is just sort of
  241. 9:33another prerequisite check that we can
  242. 9:35do
  243. 9:36alongside with the server where we check
  244. 9:38for if they're attacking, blocking,
  245. 9:40cylinder, no punch like so.
  246. 9:43So, we can also say they're stunned.
  247. 9:47etc. etc.
  248. 9:50Mainly, usually when I do this, I just
  249. 9:52check for any client values that are
  250. 9:54there
  251. 9:55that we want to prevent the player from
  252. 9:56attacking cuz the server already checks
  253. 9:58pretty much everything.
  254. 10:00But, the server can't tell if they're
  255. 10:02dashing or not because the dashing state
  256. 10:04Yeah, the dashing state is added on the
  257. 10:06client.
  258. 10:07So, we just check it over here.
  259. 10:11So,
  260. 10:13when you play the game
  261. 10:15and we dash
  262. 10:24You see that now we have a smooth
  263. 10:26transition for the punches.
  264. 10:30And that's going to pretty much wrap up
  265. 10:32this sort of shorter video before we add
  266. 10:35in different weapons in episode 7,
  267. 10:38which is also going to be released
  268. 10:39today.
  269. 10:40So, just to summarize what we did in the
  270. 10:42video, we moved the state service from
  271. 10:45service group service to
  272. 10:47the replicated storage, the shared
  273. 10:49modules.
  274. 10:50So, we can access the the service from
  275. 10:53both the client and the server.
  276. 10:55And we also added a check because we
  277. 10:57don't want the status folder to be added
  278. 10:58on the client instead on the server.
  279. 11:02And we fixed all the values in here
  280. 11:05where we just added state service check
  281. 11:06state.
  282. 11:07And
  283. 11:10we went over how exactly animations are
  284. 11:13played.
  285. 11:14And yeah, it's pretty much it. Hope you
  286. 11:16enjoyed this shorter sort of summarized
  287. 11:19video and see you on episode 7.

About this transcript

This page contains the full transcript of [Part6.5] Easy Roblox Combat System for Beginners | Episode 6 Summary & Minor Additions by Senko, generated from the public captions YouTube serves with the video. The transcript has 1,589 words across 287 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.