VideoFrame - Roblox GUI Tutorial #10 — Transcript
Full transcript
- 0:00oh my goodness what am I being
- 0:01surrounded by right now are are all
- 0:04these videos or or are these images or
- 0:07wait what some of them just played yeah
- 0:10like this this one played and this one
- 0:12played it's like kind of glitching out
- 0:13here and then there's some that are just
- 0:15not playing at all oh my goodness this
- 0:17place is crazy I don't know what is
- 0:19happening right now but anyways Roblox
- 0:22has given us the capabilities to add our
- 0:24own videos inside of Roblox studio and
- 0:26I'm basically going to be showing you
- 0:27how to implement these video frames
- 0:30inside of Roblox Studio this tutorial is
- 0:32going to be fairly short but I'm hoping
- 0:33to give you some extra info on things
- 0:36that relate to videos that I know of to
- 0:38add more value to this video and things
- 0:40like that but with that being said let's
- 0:42go and get straight into implementing
- 0:44videos inside of Roblox studio now that
- 0:46we understand it okay well do we
- 0:48actually understand it I I assume we do
- 0:51because you're literally watching a
- 0:53video right now I think we understand
- 0:55the concept of videos but I guess if I
- 0:58were to talk about video frame games uh
- 1:01Roblox has this feature that they
- 1:02implemented I think one or two years ago
- 1:05where they added videos onto the
- 1:07marketplace and we can play these videos
- 1:10inside of our game um if we decide to
- 1:15play a video um during a specific time
- 1:17or when a specific event happens then we
- 1:20can play a video which you know it's
- 1:23basically just a moving picture and so
- 1:24that's what we're about to implement
- 1:25right now now you might ask where do we
- 1:27find these videos uh we find these
- 1:30videos inside of the toolbox so what
- 1:32we're going to do is go up here to view
- 1:34and then we're going to click the
- 1:34toolbox and then it should be on the
- 1:39left side with videos this right here so
- 1:43this button with videos uh we can see
- 1:45that there's an entire catalog of videos
- 1:47that Roblox has provided for us to use
- 1:50now there are limitations with videos as
- 1:52of this moment where we can't upload our
- 1:55own videos these are all videos that
- 1:57were submitted by uh a handful of people
- 1:59that BLX has selected uh to be able to
- 2:02upload videos so there's a lot of these
- 2:05videos we can choose whichever one we
- 2:06want to implement but we can't just
- 2:09insert a video just like this we have to
- 2:11structure it in a way where we can
- 2:14basically attach this to a part so that
- 2:16we can see it as if it's like a
- 2:17billboard so what we're going to do is
- 2:20go to model on the top left of the
- 2:22screen and then we're going to hit part
- 2:24like this and then uh let's just rotate
- 2:27this scale this up just a little bit
- 2:30like this uh and we're also going to
- 2:33Anchor the part like this and we're also
- 2:35going to rename this to video part so we
- 2:38have a video part and the way we
- 2:40basically show a video onto the 3D World
- 2:45Is by placing this inside of a surface
- 2:48GUI so that it's going to be facing one
- 2:51side of this part because it's not like
- 2:54a GUI that we can place inside of
- 2:56starter GUI which is just going to show
- 2:58on our screen I think we can do that but
- 3:00I'm going to have to see in just a
- 3:01little bit but from the method I know we
- 3:04can do this by implementing it inside of
- 3:07a surface GUI onto a part so what we're
- 3:09going to do is go onto the right side
- 3:12hit the plus sign insert a surface GUI
- 3:15like this and then we can take one of
- 3:17these videos and put it inside of the
- 3:19surface GUI so let's just pick whichever
- 3:22one seems interesting let's pick this
- 3:24one the super bomb simulator short so
- 3:27let's click this and as you can see um
- 3:30if we had surface GUI selected then this
- 3:32video should be inserted inside of the
- 3:34surface GUI and it's now facing the
- 3:36front side of this part but we can't
- 3:39play it the only way we can play it is
- 3:42if we go inside of the game uh and have
- 3:44a script that that calls the play Method
- 3:47on this
- 3:50um
- 3:52video so in order to do that what we're
- 3:54going to do is let's first rename this
- 3:57uh video to let's say uh bomb video or
- 4:01something like that okay so here's what
- 4:03we're going to do we're going to go to
- 4:04the right side we're going to hit the
- 4:05plus sign and in order to play this
- 4:07video we're going to have to do it
- 4:09through a script so let's insert a
- 4:11script like this uh and it's actually
- 4:14pretty simple we're just going to first
- 4:15make reference to our frame by saying
- 4:18local video frame equals script. par
- 4:22like this and then we're going to say
- 4:24video frame colon play open and close
- 4:26parentheses so it's kind of like playing
- 4:28an audio or like a sound where where we
- 4:30basically use the play um function to be
- 4:32able to play the video and speaking of
- 4:35sound um most videos that are in this
- 4:37catalog actually do play sound as well
- 4:40alongside with the video and I'm going
- 4:42to show you what that looks like in just
- 4:43a little bit but there's uh another
- 4:46thing we have to do so if we have the
- 4:48video selected let's go down here and
- 4:51let's select looped um and we're doing
- 4:54this because if we play the video Once
- 4:55then it's just going to stop so in order
- 4:58to continuously play it we need to Loop
- 5:00it every single time that we uh reach
- 5:03the end of the video so all we need to
- 5:05do is call play one time and there's
- 5:07also other video properties here like uh
- 5:09playing resolution time length time
- 5:11position uh the video itself and keep in
- 5:14mind the videos do take in asset IDs um
- 5:17and volume but I think you know most of
- 5:20these properties already all right and
- 5:21so what I'm going to do is hit play um
- 5:23like so and once we're inside of the
- 5:26game we should be able to see that the
- 5:27video has been loaded and sound is also
- 5:30being played in the video
- 5:33too and then once the video ends it's
- 5:36just going to loop back again and it's
- 5:37going to keep playing until we stop it
- 5:40so that is the basic implementation of
- 5:42videos of video frames inside of Roblox
- 5:45Studio okay so sometimes the videos
- 5:48won't play as soon as we join to the
- 5:50game so what we need to do is basically
- 5:52make a while statement to say that um if
- 5:56the video has not been loaded yet then
- 5:57don't play it otherwise it'll throw an
- 5:59error for for us so what we need to do
- 6:02is after we declare the video frame
- 6:04we're going to drop two lines so just
- 6:05before we actually start playing the
- 6:08video what we're going to do is say
- 6:10while um video frame. is loaded do and
- 6:17what we're going to do is actually say
- 6:18while not video frame. is loaded because
- 6:21if it hasn't been loaded yet then what
- 6:22we're going to do is simply just do a
- 6:24task. weight statement um for a long
- 6:28while until it does actually start
- 6:31loading and then we can play the video
- 6:33uh it's a simple check we can do right
- 6:35before we do play the video otherwise
- 6:37it'll throw an error sometimes uh if the
- 6:39video has not loaded in uh quick enough
- 6:42to be able to play it so that's a little
- 6:44thing I wanted to add in there if we
- 6:46were to play videos as soon as we join
- 6:49into the game we can even do things to
- 6:51manipulate the playback speed other than
- 6:53just playing it because we can also
- 6:54pause the video too at any given point
- 6:57um so as a basic example we could
- 6:59probably just drop two lines like this
- 7:01add in a task. weight statement for
- 7:04maybe about like 7 or 8 seconds or so
- 7:06because it's going to take a while for
- 7:07the video to load and then play it um
- 7:10when it needs to so then we're going to
- 7:12drop two lines down here and we're just
- 7:13simply going to say video frame colon
- 7:17pause like this and then what should
- 7:20happen is after about 8 seconds it
- 7:22should just pause the video like like
- 7:24Freeze Frame it so that it's not playing
- 7:25the video anymore uh until we hit play
- 7:28again um but during this time what we
- 7:30can do is put a task. weit for about 2
- 7:34seconds so that we can actually see this
- 7:35pause happen before we do anything else
- 7:37to it uh so we can drop two lines down
- 7:39here again and we can also move the
- 7:42position of the video playing to
- 7:45whatever position we want to as long as
- 7:47it fits within the boundaries of the the
- 7:50length of the video so we can also say
- 7:53video frame. time position this is a
- 7:56property that we can change and it's not
- 7:58read only uh we can set this equal to
- 8:00let's say about 1 so that it's going to
- 8:04be 1 second into the video already um
- 8:07which is going to be the position we're
- 8:08going to put it in uh and then we're
- 8:11going to finally say video frame colon
- 8:14play open and close parentheses so that
- 8:16we can resume the video after we paused
- 8:19it so now if we go into the game hit
- 8:22play then what we should see in the
- 8:24video is it's going to play for quite a
- 8:27bit it's going to play for some time and
- 8:31then it's going to pause right there for
- 8:332 seconds and then it's going to go back
- 8:35not to the beginning of the video but
- 8:37only a second into the video then resume
- 8:40and then once the video is done it's
- 8:42going to restart from the very beginning
- 8:44once again so that's just something you
- 8:46can do in terms of manipulating um the
- 8:48playback for a video um for your
- 8:51specific needs if this is something that
- 8:53you want to do inside of your script
- 8:55then this is something you can do now
- 8:56you may have noticed sound is coming
- 8:59from from the video itself uh in
- 9:02correlation to where I am inside of the
- 9:04world so if I'm F farther away then I
- 9:07hear it less but the closer I get to the
- 9:11video the more I hear it and then of
- 9:14course if I go back farther way then I
- 9:15won't be able to hear it again this is
- 9:17the concept of 2D sound versus 3D sound
- 9:20and I think I talked about this in my
- 9:22sounds video in my Advanced scripting
- 9:24tutorial guide but just as a quick recap
- 9:26of how this works um when we have a g y
- 9:29instance that that ties with the 3D
- 9:32world like surface GUI and then we
- 9:34decide to play sounds within a 3D
- 9:37instance like the surface GUI or just a
- 9:40part in general then it's going to play
- 9:43the sound from that uh instance in
- 9:46correlation to where we are inside of
- 9:48the world that's the basic concept of 3D
- 9:51sound but if we're thinking in terms of
- 9:522D sound or also known as Global sound
- 9:56uh where it basically plays the sound
- 9:58anywhere inside of the world regardless
- 10:00of where you are then we're not going to
- 10:01be putting this video inside of a 3D
- 10:03object like the surface GUI we're simply
- 10:05just going to put the video inside of
- 10:07the workspace uh or somewhere that's uh
- 10:10available for us to hear globally with
- 10:12the sound and I'm going to show you what
- 10:13this looks like I'm going to stop this
- 10:16and I'm going to move this video uh onto
- 10:19the workspace like this and so we won't
- 10:22be able to see the video but if we hit
- 10:24play then we should be able to hear the
- 10:27sound regardless of where we are
- 10:31so yeah I'm I'm just walking around um
- 10:34I'm zooming in zooming out nothing has
- 10:36changed to the volume or the pitch of
- 10:38the sound we just hear it uh anywhere we
- 10:41are inside of the world because we
- 10:43attach this to um the workspace rather
- 10:47than an instance inside of the 3D World
- 10:50so that's a little thing I want to show
- 10:52just in case you didn't see my sounds
- 10:54video uh in my Advanced scripting
- 10:55tutorial guide and that's a concept I
- 10:57think you should be um worry about okay
- 11:01now let me show you some limitations
- 11:02that video frames currently have as of
- 11:05uh uploading this video so you might
- 11:07think how many videos can we actually
- 11:10play at a time well the simple answer to
- 11:12that is just two unfortunately like if I
- 11:15were to take this video part duplicate
- 11:17it and then move it uh right here and if
- 11:20I were to take the same video and then
- 11:22duplicate it again then what's going to
- 11:24happen is if we hit play and we join
- 11:27into the game it's going to give us a
- 11:29warning message at the bottom saying
- 11:30that at most two videos can be played
- 11:32simultaneously so as you can see the
- 11:35first two videos are being played but
- 11:37the third one is not being played unless
- 11:39we either pause one of these videos or
- 11:43we just just stop the one of the videos
- 11:45entirely and then play this Frame right
- 11:49here with this video so that that is an
- 11:51unfortunate limitation um as of right
- 11:53now with these videos is that you can
- 11:55only play two videos at once hey post
- 11:58seted BRD here here so it actually turns
- 12:00out we can make our own videos and
- 12:02upload them onto the Roblox catalog now
- 12:05before I thought that Roblox was only
- 12:08giving this permission to a specific
- 12:10handful of people because there's only
- 12:12like 40 videos on the catalog so you can
- 12:16make your own videos but there's a lot
- 12:18of requirements and restrictions when it
- 12:20comes to making these videos uh such as
- 12:22having a verified um ID to show that
- 12:26you're 13 years or older um having the
- 12:28rights to the that you're uploading
- 12:30having it be 30 seconds or less so at
- 12:32most you can have it at 30 seconds um
- 12:34making the file size not anything bigger
- 12:37than 375 megabytes having an English
- 12:39only and having the video cost 2,000 Roo
- 12:43each time you want to upload it which in
- 12:45my opinion that's that's pretty absurd
- 12:48but um we have to keep in mind video
- 12:50frames are a Beta feature as of right
- 12:53now recording this video so I'm going to
- 12:56assume that this system is going to be
- 12:58heav built upon um to be better in the
- 13:02future but I just wanted to point this
- 13:04out if in case you wanted to add your
- 13:07own videos into your game um I'm going
- 13:09to leave a link to this documentation in
- 13:11the description of this video if you
- 13:12want to check it out yourself because it
- 13:14shows how you can upload it it shows how
- 13:16you can play it and script it but I
- 13:18already showed you how to do this one so
- 13:20it's mostly just uploading the videos
- 13:23that you create that you want to put
- 13:24inside of your own game so yeah that is
- 13:27basically I want all I wanted to say
- 13:28here let's go back to to the video all
- 13:30right and to end off with this video I'm
- 13:31just going to create a very
- 13:32straightforward activation script where
- 13:35we press a button and then um the and
- 13:38then a video should be playing uh on one
- 13:40of these screens um when that does
- 13:43happen so what I'm going to do is first
- 13:46duplicate this part that we have here
- 13:48and I'm going to move it to the left
- 13:49side and for this video I'm going to
- 13:52change this to a different video um
- 13:54we're probably going to use uh let's say
- 13:57this epic countdown timer right here so
- 13:59I'm going to right click on it and then
- 14:01hit copy asset ID and then I'm going to
- 14:03go down to this video frame go to the
- 14:06video delete this hit paste like this
- 14:09and then we should have our new video uh
- 14:11like this I'm going to turn off looped
- 14:14and I'm also going to rename this to
- 14:17just simply video frame so that it's
- 14:19easier for us to use or to reference
- 14:21inside of the script um we're going to
- 14:23open up the video frame and we're go
- 14:25we're actually going to disable um this
- 14:27script that's current currently inside
- 14:29of here so now what we're going to do is
- 14:31create a folder like this and then we're
- 14:34going to uh insert a part so we're going
- 14:37to go to model and then go to part like
- 14:39this we're going to rotate this and move
- 14:41it alongside here I'm also just going to
- 14:43change the color of this to um let's say
- 14:45really red and then down here I'm going
- 14:47to make it anchored uh okay so I'm going
- 14:50to move this part into the folder and
- 14:53I'm also going to move the video part
- 14:55into the folder as well like this so we
- 14:57have two of these inside of the folder
- 15:32[Music]
- 15:41[Music]
- 15:59uh what we're going to do is first
- 16:00detect if there is a humanoid touch from
- 16:02this so we're going to say local
- 16:03humanoid equals uh hit. parent colon
- 16:07find first child humanoid and then we're
- 16:11going to make two checks the first one's
- 16:12going to be if there's a humanoid that
- 16:14exists and not touched so if touched is
- 16:18currently equal to false right now then
- 16:21we're going to set touched equal to true
- 16:24and we're also going to play the video
- 16:27frame so video frame called play like
- 16:30this so very self explanatory very
- 16:33simple um we're just going to go into
- 16:35test play and then what we should see is
- 16:39our video not playing right away it
- 16:41loaded because you can see that there's
- 16:42a black screen but it's not playing
- 16:44right now if we hit the red button then
- 16:47what we should see is the video is
- 16:49indeed playing and I can't just
- 16:50repeatedly step on this it's just going
- 16:52to play it once and then um it's not
- 16:55going to start as as soon as that's done
- 16:58uh unless we have something special like
- 17:00let's say an event to indicate when the
- 17:03video ends then we can set touch back to
- 17:06false and then we can play the video
- 17:07again we can also do that too and I'm
- 17:09going to show you what that look what
- 17:11that looks like very quickly so a video
- 17:12frame has an event called ended and it's
- 17:15basically going to fire uh when we reach
- 17:18the end of the video and if we do reach
- 17:20the end of the video that's when we can
- 17:21do something else like set touched back
- 17:24equal to false so that we can hit the
- 17:25button again once the video is over and
- 17:28we're going to structure this in a
- 17:30specific way what we're going to do is
- 17:32say video frame. ended so this is what
- 17:36the event is called and then we're going
- 17:38to simply just say colon waight open and
- 17:41close parentheses we're not going to uh
- 17:43make a connection to this using a
- 17:45function we're simply just going to wait
- 17:48for this event to fire uh when the video
- 17:50ends and then down here we're going to
- 17:53set touched equal to false so that we
- 17:56can press it again once it's over okay
- 17:59so there's actually a couple more things
- 18:00we have to do on top of this so when the
- 18:03video frame ends we can't just have it
- 18:05end at the very end and then expect for
- 18:08it to start once again um at the
- 18:11starting position we have to do that
- 18:13ourselves um and we also have to make
- 18:15sure the video is paused before we hit
- 18:17play again because we don't have methods
- 18:19like stopping the video so the only ones
- 18:22we have to work with are the ones that
- 18:24allow us to play it and the ones that
- 18:26allow us to pause it so we have to do
- 18:28both of these things
- 18:29um right when we finish the video so
- 18:32what we're going to do down here is uh
- 18:34drop a line after the ended weight
- 18:36statement and what we're going to do is
- 18:38say video frame colon pause open and
- 18:43close parentheses and then what we're
- 18:44going to do is say video frame. time
- 18:48position equals z so what should happen
- 18:51is when we hit the part for the first
- 18:53time we're going to set this equal to
- 18:54True uh the the touched debounce uh
- 18:57variable we're going to play the video
- 18:59and then wait for it to finish and then
- 19:00once it does finish we're going to pause
- 19:02the video so that it's not going to
- 19:03further play the video once we end up
- 19:05finishing the video so then uh we're
- 19:07going to set the time position back to
- 19:09zero so we're going to start back at uh
- 19:11square one and then we're going to set
- 19:13touch equal to false so that we can
- 19:14allow the player to touch the part uh
- 19:17once again so let's hit play okay I
- 19:20think what's supposed to happen is I'm
- 19:21supposed to put this after the touched
- 19:25variable I'm pretty sure that's how it
- 19:26goes so let's go go hit play again and
- 19:30now what we should see is if we hit this
- 19:33button then we should be able to see
- 19:35that it is running as expected and I
- 19:37can't do anything with it while it's
- 19:39playing right now so once it does finish
- 19:42then it should not play but then if I
- 19:44hit it again then it's going to play it
- 19:46again and we can basically do the same
- 19:48thing once we finish it and then play it
- 19:51back one more time afterwards so that is
- 19:55a little interactive uh example that I
- 19:57have for you with videos if you decide
- 19:59to do this inside of your Roblox game
- 20:00but of course there are other
- 20:02possibilities you can have with these
- 20:03videos If you decide to implement them
- 20:05so that's basically going to be it for
- 20:06this tutorial uh on video frames so with
- 20:09that being said I hope you enjoyed this
- 20:11video and I will see you in the next one
- 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.