YouTube2Text

VideoFrame - Roblox GUI Tutorial #10 — Transcript

by BrawlDev · 3,846 words · 492 segments · language en · Watch on YouTube

Full transcript

  1. 0:00oh my goodness what am I being
  2. 0:01surrounded by right now are are all
  3. 0:04these videos or or are these images or
  4. 0:07wait what some of them just played yeah
  5. 0:10like this this one played and this one
  6. 0:12played it's like kind of glitching out
  7. 0:13here and then there's some that are just
  8. 0:15not playing at all oh my goodness this
  9. 0:17place is crazy I don't know what is
  10. 0:19happening right now but anyways Roblox
  11. 0:22has given us the capabilities to add our
  12. 0:24own videos inside of Roblox studio and
  13. 0:26I'm basically going to be showing you
  14. 0:27how to implement these video frames
  15. 0:30inside of Roblox Studio this tutorial is
  16. 0:32going to be fairly short but I'm hoping
  17. 0:33to give you some extra info on things
  18. 0:36that relate to videos that I know of to
  19. 0:38add more value to this video and things
  20. 0:40like that but with that being said let's
  21. 0:42go and get straight into implementing
  22. 0:44videos inside of Roblox studio now that
  23. 0:46we understand it okay well do we
  24. 0:48actually understand it I I assume we do
  25. 0:51because you're literally watching a
  26. 0:53video right now I think we understand
  27. 0:55the concept of videos but I guess if I
  28. 0:58were to talk about video frame games uh
  29. 1:01Roblox has this feature that they
  30. 1:02implemented I think one or two years ago
  31. 1:05where they added videos onto the
  32. 1:07marketplace and we can play these videos
  33. 1:10inside of our game um if we decide to
  34. 1:15play a video um during a specific time
  35. 1:17or when a specific event happens then we
  36. 1:20can play a video which you know it's
  37. 1:23basically just a moving picture and so
  38. 1:24that's what we're about to implement
  39. 1:25right now now you might ask where do we
  40. 1:27find these videos uh we find these
  41. 1:30videos inside of the toolbox so what
  42. 1:32we're going to do is go up here to view
  43. 1:34and then we're going to click the
  44. 1:34toolbox and then it should be on the
  45. 1:39left side with videos this right here so
  46. 1:43this button with videos uh we can see
  47. 1:45that there's an entire catalog of videos
  48. 1:47that Roblox has provided for us to use
  49. 1:50now there are limitations with videos as
  50. 1:52of this moment where we can't upload our
  51. 1:55own videos these are all videos that
  52. 1:57were submitted by uh a handful of people
  53. 1:59that BLX has selected uh to be able to
  54. 2:02upload videos so there's a lot of these
  55. 2:05videos we can choose whichever one we
  56. 2:06want to implement but we can't just
  57. 2:09insert a video just like this we have to
  58. 2:11structure it in a way where we can
  59. 2:14basically attach this to a part so that
  60. 2:16we can see it as if it's like a
  61. 2:17billboard so what we're going to do is
  62. 2:20go to model on the top left of the
  63. 2:22screen and then we're going to hit part
  64. 2:24like this and then uh let's just rotate
  65. 2:27this scale this up just a little bit
  66. 2:30like this uh and we're also going to
  67. 2:33Anchor the part like this and we're also
  68. 2:35going to rename this to video part so we
  69. 2:38have a video part and the way we
  70. 2:40basically show a video onto the 3D World
  71. 2:45Is by placing this inside of a surface
  72. 2:48GUI so that it's going to be facing one
  73. 2:51side of this part because it's not like
  74. 2:54a GUI that we can place inside of
  75. 2:56starter GUI which is just going to show
  76. 2:58on our screen I think we can do that but
  77. 3:00I'm going to have to see in just a
  78. 3:01little bit but from the method I know we
  79. 3:04can do this by implementing it inside of
  80. 3:07a surface GUI onto a part so what we're
  81. 3:09going to do is go onto the right side
  82. 3:12hit the plus sign insert a surface GUI
  83. 3:15like this and then we can take one of
  84. 3:17these videos and put it inside of the
  85. 3:19surface GUI so let's just pick whichever
  86. 3:22one seems interesting let's pick this
  87. 3:24one the super bomb simulator short so
  88. 3:27let's click this and as you can see um
  89. 3:30if we had surface GUI selected then this
  90. 3:32video should be inserted inside of the
  91. 3:34surface GUI and it's now facing the
  92. 3:36front side of this part but we can't
  93. 3:39play it the only way we can play it is
  94. 3:42if we go inside of the game uh and have
  95. 3:44a script that that calls the play Method
  96. 3:47on this
  97. 3:50um
  98. 3:52video so in order to do that what we're
  99. 3:54going to do is let's first rename this
  100. 3:57uh video to let's say uh bomb video or
  101. 4:01something like that okay so here's what
  102. 4:03we're going to do we're going to go to
  103. 4:04the right side we're going to hit the
  104. 4:05plus sign and in order to play this
  105. 4:07video we're going to have to do it
  106. 4:09through a script so let's insert a
  107. 4:11script like this uh and it's actually
  108. 4:14pretty simple we're just going to first
  109. 4:15make reference to our frame by saying
  110. 4:18local video frame equals script. par
  111. 4:22like this and then we're going to say
  112. 4:24video frame colon play open and close
  113. 4:26parentheses so it's kind of like playing
  114. 4:28an audio or like a sound where where we
  115. 4:30basically use the play um function to be
  116. 4:32able to play the video and speaking of
  117. 4:35sound um most videos that are in this
  118. 4:37catalog actually do play sound as well
  119. 4:40alongside with the video and I'm going
  120. 4:42to show you what that looks like in just
  121. 4:43a little bit but there's uh another
  122. 4:46thing we have to do so if we have the
  123. 4:48video selected let's go down here and
  124. 4:51let's select looped um and we're doing
  125. 4:54this because if we play the video Once
  126. 4:55then it's just going to stop so in order
  127. 4:58to continuously play it we need to Loop
  128. 5:00it every single time that we uh reach
  129. 5:03the end of the video so all we need to
  130. 5:05do is call play one time and there's
  131. 5:07also other video properties here like uh
  132. 5:09playing resolution time length time
  133. 5:11position uh the video itself and keep in
  134. 5:14mind the videos do take in asset IDs um
  135. 5:17and volume but I think you know most of
  136. 5:20these properties already all right and
  137. 5:21so what I'm going to do is hit play um
  138. 5:23like so and once we're inside of the
  139. 5:26game we should be able to see that the
  140. 5:27video has been loaded and sound is also
  141. 5:30being played in the video
  142. 5:33too and then once the video ends it's
  143. 5:36just going to loop back again and it's
  144. 5:37going to keep playing until we stop it
  145. 5:40so that is the basic implementation of
  146. 5:42videos of video frames inside of Roblox
  147. 5:45Studio okay so sometimes the videos
  148. 5:48won't play as soon as we join to the
  149. 5:50game so what we need to do is basically
  150. 5:52make a while statement to say that um if
  151. 5:56the video has not been loaded yet then
  152. 5:57don't play it otherwise it'll throw an
  153. 5:59error for for us so what we need to do
  154. 6:02is after we declare the video frame
  155. 6:04we're going to drop two lines so just
  156. 6:05before we actually start playing the
  157. 6:08video what we're going to do is say
  158. 6:10while um video frame. is loaded do and
  159. 6:17what we're going to do is actually say
  160. 6:18while not video frame. is loaded because
  161. 6:21if it hasn't been loaded yet then what
  162. 6:22we're going to do is simply just do a
  163. 6:24task. weight statement um for a long
  164. 6:28while until it does actually start
  165. 6:31loading and then we can play the video
  166. 6:33uh it's a simple check we can do right
  167. 6:35before we do play the video otherwise
  168. 6:37it'll throw an error sometimes uh if the
  169. 6:39video has not loaded in uh quick enough
  170. 6:42to be able to play it so that's a little
  171. 6:44thing I wanted to add in there if we
  172. 6:46were to play videos as soon as we join
  173. 6:49into the game we can even do things to
  174. 6:51manipulate the playback speed other than
  175. 6:53just playing it because we can also
  176. 6:54pause the video too at any given point
  177. 6:57um so as a basic example we could
  178. 6:59probably just drop two lines like this
  179. 7:01add in a task. weight statement for
  180. 7:04maybe about like 7 or 8 seconds or so
  181. 7:06because it's going to take a while for
  182. 7:07the video to load and then play it um
  183. 7:10when it needs to so then we're going to
  184. 7:12drop two lines down here and we're just
  185. 7:13simply going to say video frame colon
  186. 7:17pause like this and then what should
  187. 7:20happen is after about 8 seconds it
  188. 7:22should just pause the video like like
  189. 7:24Freeze Frame it so that it's not playing
  190. 7:25the video anymore uh until we hit play
  191. 7:28again um but during this time what we
  192. 7:30can do is put a task. weit for about 2
  193. 7:34seconds so that we can actually see this
  194. 7:35pause happen before we do anything else
  195. 7:37to it uh so we can drop two lines down
  196. 7:39here again and we can also move the
  197. 7:42position of the video playing to
  198. 7:45whatever position we want to as long as
  199. 7:47it fits within the boundaries of the the
  200. 7:50length of the video so we can also say
  201. 7:53video frame. time position this is a
  202. 7:56property that we can change and it's not
  203. 7:58read only uh we can set this equal to
  204. 8:00let's say about 1 so that it's going to
  205. 8:04be 1 second into the video already um
  206. 8:07which is going to be the position we're
  207. 8:08going to put it in uh and then we're
  208. 8:11going to finally say video frame colon
  209. 8:14play open and close parentheses so that
  210. 8:16we can resume the video after we paused
  211. 8:19it so now if we go into the game hit
  212. 8:22play then what we should see in the
  213. 8:24video is it's going to play for quite a
  214. 8:27bit it's going to play for some time and
  215. 8:31then it's going to pause right there for
  216. 8:332 seconds and then it's going to go back
  217. 8:35not to the beginning of the video but
  218. 8:37only a second into the video then resume
  219. 8:40and then once the video is done it's
  220. 8:42going to restart from the very beginning
  221. 8:44once again so that's just something you
  222. 8:46can do in terms of manipulating um the
  223. 8:48playback for a video um for your
  224. 8:51specific needs if this is something that
  225. 8:53you want to do inside of your script
  226. 8:55then this is something you can do now
  227. 8:56you may have noticed sound is coming
  228. 8:59from from the video itself uh in
  229. 9:02correlation to where I am inside of the
  230. 9:04world so if I'm F farther away then I
  231. 9:07hear it less but the closer I get to the
  232. 9:11video the more I hear it and then of
  233. 9:14course if I go back farther way then I
  234. 9:15won't be able to hear it again this is
  235. 9:17the concept of 2D sound versus 3D sound
  236. 9:20and I think I talked about this in my
  237. 9:22sounds video in my Advanced scripting
  238. 9:24tutorial guide but just as a quick recap
  239. 9:26of how this works um when we have a g y
  240. 9:29instance that that ties with the 3D
  241. 9:32world like surface GUI and then we
  242. 9:34decide to play sounds within a 3D
  243. 9:37instance like the surface GUI or just a
  244. 9:40part in general then it's going to play
  245. 9:43the sound from that uh instance in
  246. 9:46correlation to where we are inside of
  247. 9:48the world that's the basic concept of 3D
  248. 9:51sound but if we're thinking in terms of
  249. 9:522D sound or also known as Global sound
  250. 9:56uh where it basically plays the sound
  251. 9:58anywhere inside of the world regardless
  252. 10:00of where you are then we're not going to
  253. 10:01be putting this video inside of a 3D
  254. 10:03object like the surface GUI we're simply
  255. 10:05just going to put the video inside of
  256. 10:07the workspace uh or somewhere that's uh
  257. 10:10available for us to hear globally with
  258. 10:12the sound and I'm going to show you what
  259. 10:13this looks like I'm going to stop this
  260. 10:16and I'm going to move this video uh onto
  261. 10:19the workspace like this and so we won't
  262. 10:22be able to see the video but if we hit
  263. 10:24play then we should be able to hear the
  264. 10:27sound regardless of where we are
  265. 10:31so yeah I'm I'm just walking around um
  266. 10:34I'm zooming in zooming out nothing has
  267. 10:36changed to the volume or the pitch of
  268. 10:38the sound we just hear it uh anywhere we
  269. 10:41are inside of the world because we
  270. 10:43attach this to um the workspace rather
  271. 10:47than an instance inside of the 3D World
  272. 10:50so that's a little thing I want to show
  273. 10:52just in case you didn't see my sounds
  274. 10:54video uh in my Advanced scripting
  275. 10:55tutorial guide and that's a concept I
  276. 10:57think you should be um worry about okay
  277. 11:01now let me show you some limitations
  278. 11:02that video frames currently have as of
  279. 11:05uh uploading this video so you might
  280. 11:07think how many videos can we actually
  281. 11:10play at a time well the simple answer to
  282. 11:12that is just two unfortunately like if I
  283. 11:15were to take this video part duplicate
  284. 11:17it and then move it uh right here and if
  285. 11:20I were to take the same video and then
  286. 11:22duplicate it again then what's going to
  287. 11:24happen is if we hit play and we join
  288. 11:27into the game it's going to give us a
  289. 11:29warning message at the bottom saying
  290. 11:30that at most two videos can be played
  291. 11:32simultaneously so as you can see the
  292. 11:35first two videos are being played but
  293. 11:37the third one is not being played unless
  294. 11:39we either pause one of these videos or
  295. 11:43we just just stop the one of the videos
  296. 11:45entirely and then play this Frame right
  297. 11:49here with this video so that that is an
  298. 11:51unfortunate limitation um as of right
  299. 11:53now with these videos is that you can
  300. 11:55only play two videos at once hey post
  301. 11:58seted BRD here here so it actually turns
  302. 12:00out we can make our own videos and
  303. 12:02upload them onto the Roblox catalog now
  304. 12:05before I thought that Roblox was only
  305. 12:08giving this permission to a specific
  306. 12:10handful of people because there's only
  307. 12:12like 40 videos on the catalog so you can
  308. 12:16make your own videos but there's a lot
  309. 12:18of requirements and restrictions when it
  310. 12:20comes to making these videos uh such as
  311. 12:22having a verified um ID to show that
  312. 12:26you're 13 years or older um having the
  313. 12:28rights to the that you're uploading
  314. 12:30having it be 30 seconds or less so at
  315. 12:32most you can have it at 30 seconds um
  316. 12:34making the file size not anything bigger
  317. 12:37than 375 megabytes having an English
  318. 12:39only and having the video cost 2,000 Roo
  319. 12:43each time you want to upload it which in
  320. 12:45my opinion that's that's pretty absurd
  321. 12:48but um we have to keep in mind video
  322. 12:50frames are a Beta feature as of right
  323. 12:53now recording this video so I'm going to
  324. 12:56assume that this system is going to be
  325. 12:58heav built upon um to be better in the
  326. 13:02future but I just wanted to point this
  327. 13:04out if in case you wanted to add your
  328. 13:07own videos into your game um I'm going
  329. 13:09to leave a link to this documentation in
  330. 13:11the description of this video if you
  331. 13:12want to check it out yourself because it
  332. 13:14shows how you can upload it it shows how
  333. 13:16you can play it and script it but I
  334. 13:18already showed you how to do this one so
  335. 13:20it's mostly just uploading the videos
  336. 13:23that you create that you want to put
  337. 13:24inside of your own game so yeah that is
  338. 13:27basically I want all I wanted to say
  339. 13:28here let's go back to to the video all
  340. 13:30right and to end off with this video I'm
  341. 13:31just going to create a very
  342. 13:32straightforward activation script where
  343. 13:35we press a button and then um the and
  344. 13:38then a video should be playing uh on one
  345. 13:40of these screens um when that does
  346. 13:43happen so what I'm going to do is first
  347. 13:46duplicate this part that we have here
  348. 13:48and I'm going to move it to the left
  349. 13:49side and for this video I'm going to
  350. 13:52change this to a different video um
  351. 13:54we're probably going to use uh let's say
  352. 13:57this epic countdown timer right here so
  353. 13:59I'm going to right click on it and then
  354. 14:01hit copy asset ID and then I'm going to
  355. 14:03go down to this video frame go to the
  356. 14:06video delete this hit paste like this
  357. 14:09and then we should have our new video uh
  358. 14:11like this I'm going to turn off looped
  359. 14:14and I'm also going to rename this to
  360. 14:17just simply video frame so that it's
  361. 14:19easier for us to use or to reference
  362. 14:21inside of the script um we're going to
  363. 14:23open up the video frame and we're go
  364. 14:25we're actually going to disable um this
  365. 14:27script that's current currently inside
  366. 14:29of here so now what we're going to do is
  367. 14:31create a folder like this and then we're
  368. 14:34going to uh insert a part so we're going
  369. 14:37to go to model and then go to part like
  370. 14:39this we're going to rotate this and move
  371. 14:41it alongside here I'm also just going to
  372. 14:43change the color of this to um let's say
  373. 14:45really red and then down here I'm going
  374. 14:47to make it anchored uh okay so I'm going
  375. 14:50to move this part into the folder and
  376. 14:53I'm also going to move the video part
  377. 14:55into the folder as well like this so we
  378. 14:57have two of these inside of the folder
  379. 15:32[Music]
  380. 15:41[Music]
  381. 15:59uh what we're going to do is first
  382. 16:00detect if there is a humanoid touch from
  383. 16:02this so we're going to say local
  384. 16:03humanoid equals uh hit. parent colon
  385. 16:07find first child humanoid and then we're
  386. 16:11going to make two checks the first one's
  387. 16:12going to be if there's a humanoid that
  388. 16:14exists and not touched so if touched is
  389. 16:18currently equal to false right now then
  390. 16:21we're going to set touched equal to true
  391. 16:24and we're also going to play the video
  392. 16:27frame so video frame called play like
  393. 16:30this so very self explanatory very
  394. 16:33simple um we're just going to go into
  395. 16:35test play and then what we should see is
  396. 16:39our video not playing right away it
  397. 16:41loaded because you can see that there's
  398. 16:42a black screen but it's not playing
  399. 16:44right now if we hit the red button then
  400. 16:47what we should see is the video is
  401. 16:49indeed playing and I can't just
  402. 16:50repeatedly step on this it's just going
  403. 16:52to play it once and then um it's not
  404. 16:55going to start as as soon as that's done
  405. 16:58uh unless we have something special like
  406. 17:00let's say an event to indicate when the
  407. 17:03video ends then we can set touch back to
  408. 17:06false and then we can play the video
  409. 17:07again we can also do that too and I'm
  410. 17:09going to show you what that look what
  411. 17:11that looks like very quickly so a video
  412. 17:12frame has an event called ended and it's
  413. 17:15basically going to fire uh when we reach
  414. 17:18the end of the video and if we do reach
  415. 17:20the end of the video that's when we can
  416. 17:21do something else like set touched back
  417. 17:24equal to false so that we can hit the
  418. 17:25button again once the video is over and
  419. 17:28we're going to structure this in a
  420. 17:30specific way what we're going to do is
  421. 17:32say video frame. ended so this is what
  422. 17:36the event is called and then we're going
  423. 17:38to simply just say colon waight open and
  424. 17:41close parentheses we're not going to uh
  425. 17:43make a connection to this using a
  426. 17:45function we're simply just going to wait
  427. 17:48for this event to fire uh when the video
  428. 17:50ends and then down here we're going to
  429. 17:53set touched equal to false so that we
  430. 17:56can press it again once it's over okay
  431. 17:59so there's actually a couple more things
  432. 18:00we have to do on top of this so when the
  433. 18:03video frame ends we can't just have it
  434. 18:05end at the very end and then expect for
  435. 18:08it to start once again um at the
  436. 18:11starting position we have to do that
  437. 18:13ourselves um and we also have to make
  438. 18:15sure the video is paused before we hit
  439. 18:17play again because we don't have methods
  440. 18:19like stopping the video so the only ones
  441. 18:22we have to work with are the ones that
  442. 18:24allow us to play it and the ones that
  443. 18:26allow us to pause it so we have to do
  444. 18:28both of these things
  445. 18:29um right when we finish the video so
  446. 18:32what we're going to do down here is uh
  447. 18:34drop a line after the ended weight
  448. 18:36statement and what we're going to do is
  449. 18:38say video frame colon pause open and
  450. 18:43close parentheses and then what we're
  451. 18:44going to do is say video frame. time
  452. 18:48position equals z so what should happen
  453. 18:51is when we hit the part for the first
  454. 18:53time we're going to set this equal to
  455. 18:54True uh the the touched debounce uh
  456. 18:57variable we're going to play the video
  457. 18:59and then wait for it to finish and then
  458. 19:00once it does finish we're going to pause
  459. 19:02the video so that it's not going to
  460. 19:03further play the video once we end up
  461. 19:05finishing the video so then uh we're
  462. 19:07going to set the time position back to
  463. 19:09zero so we're going to start back at uh
  464. 19:11square one and then we're going to set
  465. 19:13touch equal to false so that we can
  466. 19:14allow the player to touch the part uh
  467. 19:17once again so let's hit play okay I
  468. 19:20think what's supposed to happen is I'm
  469. 19:21supposed to put this after the touched
  470. 19:25variable I'm pretty sure that's how it
  471. 19:26goes so let's go go hit play again and
  472. 19:30now what we should see is if we hit this
  473. 19:33button then we should be able to see
  474. 19:35that it is running as expected and I
  475. 19:37can't do anything with it while it's
  476. 19:39playing right now so once it does finish
  477. 19:42then it should not play but then if I
  478. 19:44hit it again then it's going to play it
  479. 19:46again and we can basically do the same
  480. 19:48thing once we finish it and then play it
  481. 19:51back one more time afterwards so that is
  482. 19:55a little interactive uh example that I
  483. 19:57have for you with videos if you decide
  484. 19:59to do this inside of your Roblox game
  485. 20:00but of course there are other
  486. 20:02possibilities you can have with these
  487. 20:03videos If you decide to implement them
  488. 20:05so that's basically going to be it for
  489. 20:06this tutorial uh on video frames so with
  490. 20:09that being said I hope you enjoyed this
  491. 20:11video and I will see you in the next one
  492. 20:14take care

About this transcript

This page contains the full transcript of VideoFrame - Roblox GUI Tutorial #10 by BrawlDev, generated from the public captions YouTube serves with the video. The transcript has 3,846 words across 492 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.