Sounds & Sound Groups - Roblox Advanced Scripting #9 — Transcript
Full transcript
- 0:00ooh free
- 0:02tacos I am quite
- 0:06hungry oh
- 0:08no
- 0:10[Music]
- 0:13T okay okay you might ask what the heck
- 0:16that was about that was pretty much my
- 0:18introduction to what we're going to be
- 0:19talking about in this episode which is
- 0:21going to be sounds and sound groups and
- 0:23so in any video game you can think of
- 0:26not even just Roblox but any video game
- 0:28sound design is one of the most
- 0:30important aspects to a video game
- 0:32because it enhances the gameplay
- 0:34experience for everybody that's playing
- 0:36the game like imagine the example that I
- 0:38just showed you like 30 seconds ago
- 0:40without any sounds it would probably
- 0:42sound less cringe sure but but those
- 0:44sounds are able to amplify the gameplay
- 0:46experience for everybody that's playing
- 0:48the game and so that's what I'm going to
- 0:50be showing you how to do inside of this
- 0:51episode so with that being said let's
- 0:53jump straight into the episode all right
- 0:55let's think about this for a minute now
- 0:57that we know sounds exist where do we
- 0:59find these sounds or in this case audio
- 1:02well there's two places of finding these
- 1:04sounds and the first one is from the
- 1:06Roblox website itself in the creators
- 1:09tab but I'm going to be showing you the
- 1:10second way of finding these audio and
- 1:13that is from the toolbox if you don't
- 1:15remember where the toolboxes there's two
- 1:17ways of finding it so the first one is
- 1:20if you go to home there should be this
- 1:22toolbox button under the insert category
- 1:24if we click that then we should see a
- 1:27toolbox popup that shows us a whole
- 1:29whole bunch of community created
- 1:31resources that we can Implement straight
- 1:33into our Roblox game the second place to
- 1:36find this is by going to view and then
- 1:38clicking on the toolbox um button that
- 1:41shows right here I mentioned this
- 1:43previously when I introduced the toolbox
- 1:45you should generally not use this
- 1:47toolbox because there's a lot of
- 1:48backdoor scripts in a lot of these
- 1:50Community created assets so I would be
- 1:53very cautious implementing these inside
- 1:55of your Roblox game but for the sake of
- 1:57this tutorial we'll be using it so to
- 1:59find these audio we have to click on
- 2:01this drop down that says models and we
- 2:03should see a tab called audio if we
- 2:06click that then we should see two
- 2:08different tabs that show sound effects
- 2:10and music so in this case what we're
- 2:13going to do is just go through these
- 2:15entries and pick out which one seems the
- 2:18best to us so by each of these we can
- 2:20click this play button to test out the
- 2:22audio before inserting it into our game
- 2:24so let's hit
- 2:26this okay so this is a simple rain sound
- 2:29effect let's try the second
- 2:32one okay so this one sounds like a this
- 2:36this one sounds like pretty good music
- 2:38um well this is in the sound effects
- 2:39category so it doesn't really make sense
- 2:41uh but yeah this sound effect or music
- 2:44in this case sounds pretty good so how
- 2:46do we insert it well we just simply hit
- 2:48this insert button and this will insert
- 2:51it straight into our workspace and it
- 2:54comes in an instance called a sound so
- 2:57this is pretty much what it looks like
- 2:59and down here in the properties we can
- 3:01see that we can preview this sound
- 3:03effect just by clicking on this play
- 3:05button and this is to let us know that
- 3:08the sound is actually working
- 3:10properly so now it just comes down to
- 3:12implementing it through our scripts so
- 3:15there's an important property I want you
- 3:16to understand first and that is this
- 3:19property called sound ID and it's pretty
- 3:21much a string that basically has a URL
- 3:24of RBX asset ID colon uh 24 dases and
- 3:29then you have this big number right here
- 3:31at the end of it this is essentially a
- 3:33unique ID to this specific audio that we
- 3:37just pulled out which is this uh song
- 3:39that we pulled from the audio library so
- 3:42if we change this number to a different
- 3:45number that's also an ID for another
- 3:48sound then it'll change our sound object
- 3:52to that new sound so for instance let's
- 3:55take another sound uh just like
- 3:57something completely random uh let's
- 3:59insert this one this one is called
- 4:01nightmare yelling bursts of distorted
- 4:03something I don't even know what that
- 4:04says by the end of it but as you can see
- 4:07with this sound ID the URL is the same
- 4:10but what's different is the number so
- 4:12this one is like 912 something something
- 4:14something 501 this one is 9125 something
- 4:17something something 017 so these have a
- 4:20different ID from each other letting you
- 4:23know that this is the sound for whatever
- 4:27this sound is on the Roblox website so
- 4:30that's something I wanted you to know
- 4:31about there's a bunch of other
- 4:32properties here like in this playback
- 4:34category that shows looped playback
- 4:36speed time position and volume so let me
- 4:39give you a quick rundown of each of
- 4:41these so looped basically means that
- 4:43when the sound finishes when it reaches
- 4:46the end of the its time length then it's
- 4:49just simply going to play the sound
- 4:52again from the beginning so if I have
- 4:53this selected and I just play this then
- 4:56by the end it should automatically
- 4:58restart playback speed is basically how
- 5:01fast the audio is playing so if if I set
- 5:04this to two then it should double the
- 5:07speed of the playback
- 5:11speed and by default the number is just
- 5:13one time position is where in the audio
- 5:16you want to start and finally we have
- 5:18volume which obviously it's how loud or
- 5:21how soft the audio is when you play it
- 5:24so 0.5 is the default but a lot of sound
- 5:26effects I know developers use is usually
- 5:29at volume 1 but that really depends on
- 5:32your preference so that was just a quick
- 5:33rundown of some of the sound properties
- 5:36we might use inside of our Roblox games
- 5:38now let's get to playing these sound
- 5:39effects inside of our game so on the
- 5:42right side let's rename our sound to
- 5:45test music and then let's add in a
- 5:48script inside of workspace so let's
- 5:50insert a script and let's first make
- 5:52reference to our sound so we'll say
- 5:55local music equals script.
- 6:00parent. test music and there's basically
- 6:03four methods or functions that I want to
- 6:05teach you with sounds and the first
- 6:07one's going to actually play the sound
- 6:09so we're going to simply just say music
- 6:13colon play open parentheses close
- 6:15parenthesis and that's literally it it's
- 6:17just one simple line so if I go and hit
- 6:21test as soon as we join into the game
- 6:24then the sound should be
- 6:27playing so there you go as soon as we
- 6:30joined in the game The Script made the
- 6:31sound play and it's going to keep on
- 6:33playing until it reaches the end of the
- 6:35sound and then it's going to stop unless
- 6:38we have Loop turned on which in this
- 6:39case we don't so if at any certain point
- 6:42we want to pause the music we would just
- 6:45drop a line down here and we would
- 6:46simply just say music colon pause open
- 6:50parentheses close parenthesis and we can
- 6:52add in a task. weight here for like
- 6:54about 3 seconds for it to just pause and
- 6:58when we pause it we can also resume it
- 6:59too so let's add in another task. we of
- 7:032 seconds and put in music colon resume
- 7:07to continue where it left off and then
- 7:10finally at the end we could just stop it
- 7:12completely by saying task. weight uh
- 7:15about maybe 5 seconds and then we'll say
- 7:18music colon stop so this will just
- 7:22completely stop the music and it'll make
- 7:24the time position go back to the
- 7:26beginning so that we'll wait for the
- 7:28next time that we call uh music colon
- 7:31play so now let's test the game so what
- 7:34should happen is about in about 3
- 7:36seconds it'll pause the sound and then
- 7:38it'll resume it and then stop
- 7:41it yeah so it paused and then it resumed
- 7:44so now after a little bit it should
- 7:46completely stop it all right and there
- 7:49we go so now we've successfully been
- 7:51able to play our sounds we've been able
- 7:53to pause it resume it and even stop it
- 7:55so those are all the methods provided to
- 7:58us with sounds on Roblox now you might
- 8:00have questions about the audio that just
- 8:02played who is it being played to how far
- 8:06can you hear this sound this is a
- 8:08concept with Roblox sounds that I'm
- 8:09going to be calling Global and local
- 8:13sounds so pretty much what you just
- 8:15heard was a global sound because we had
- 8:18a script inside of workspace play the
- 8:21sound as soon as the game started up so
- 8:24everybody inside of the game so every
- 8:26player no matter when they join the game
- 8:29they will hear the same part of the
- 8:32sound wherever they are and with
- 8:34whatever property the sound has so if we
- 8:38were in the first 30 seconds of the
- 8:40sound then all players are going to be
- 8:43hearing that specific part of the sound
- 8:46if it's at volume two they're going to
- 8:47hear it at volume two and if it's at
- 8:49playback speed two then they're also
- 8:51going to hear that so that's pretty much
- 8:53what Global sound is but now you might
- 8:55wonder how do we play a sound for a
- 8:57specific player this is is actually
- 8:59relatively easy what we can do is put in
- 9:02a sound inside of any property that's
- 9:04only local to the player like starter
- 9:06GUI starter pack starter player just
- 9:09insert sounds in there and have a local
- 9:11script play that sound so let's take
- 9:15starter GUI for example so I'm going to
- 9:17take this music and put it inside of
- 9:19starter GUI and I'm also going to
- 9:22disable the script since we're not going
- 9:24to use it anymore let's create a new
- 9:26local script inside of starter GUI and
- 9:28let's make reference to our test music
- 9:31so we're going to say local music equals
- 9:33script. parent. test music now what
- 9:37we'll do is we'll just simply say music
- 9:40colon play just like before now let's go
- 9:43into the game hit test and hit play see
- 9:46what happens it's kind of hard to tell
- 9:47the difference but trust me when I say
- 9:49that this is that this is being played
- 9:51on the local player whenever the player
- 9:54has joined the game for the first time
- 9:55so meaning in about 30 seconds if
- 9:58another player joins the game they're
- 10:00going to be hearing the sound from the
- 10:02beginning and not where I currently am
- 10:04with the sound so the sound is pretty
- 10:06much going to be located inside of our
- 10:08player GUI and this is where it's going
- 10:10to be played so this is the most common
- 10:13place you would see local sounds it
- 10:15would usually be inside of your player
- 10:16GUI because if you had like a GUI shop
- 10:21or any sort of UI interface that plays a
- 10:23sound whenever you open it up or
- 10:25interact with it then it's usually going
- 10:26to be played inside of starter GUI or
- 10:29just any local sound period it's going
- 10:31to be played inside of player GUI We Now
- 10:33understand Global sounds we also Now
- 10:35understand local sounds but there's also
- 10:37another type of sound that I would like
- 10:40to call proximity sounds and these are
- 10:42basically sounds that can be heard from
- 10:45a specific part of the game where the
- 10:48closer you are to that part the louder
- 10:51the sound is but the farther you wait
- 10:53the farther away you are from that part
- 10:55the quieter it gets so I think you've
- 10:58seen many examples of this in in Roblox
- 11:01games before so I think you know what
- 11:02I'm talking about but if I just insert a
- 11:04part and let's say there was a sound
- 11:07that was coming out of this part
- 11:08specifically the closer I walk up to it
- 11:11the louder it gets but then the farther
- 11:13away the character goes the quieter the
- 11:16sound is going to get until it's barely
- 11:18audible anymore so this is what I call
- 11:21so this is what I like to call proximity
- 11:22sounds and that's what we're going to do
- 11:23for this part so let's find a new sound
- 11:25let's go to view and toolbox let's just
- 11:28search up bubble and see what comes
- 11:32up okay yeah it's a little quiet but I
- 11:35think it works so let's hit insert oh
- 11:37yeah and by the way whatever instance
- 11:39you're selecting inside of the Explorer
- 11:40whether that would be workspace uh
- 11:43replicated storage or just a specific
- 11:45part if you have it selected and you
- 11:47insert something from the toolbox it'll
- 11:50automatically set its uh it'll
- 11:52automatically set its parent to whatever
- 11:54you selected so I think that's something
- 11:56very useful to know about okay but let's
- 11:59rename this sound to something that's
- 12:01easier to reference so let's just call
- 12:03this Bubbles and let's insert another
- 12:06script so let's make reference to our
- 12:08Sound by saying
- 12:11local bubbles equals script. parent.
- 12:15Bubbles and let's just simply play it
- 12:18bubbles colon play we might also make
- 12:21the volume a little bit higher too so we
- 12:22can hear it better so let's say bubbles.
- 12:25volume equals 2 and let's also make it a
- 12:27looped sound effect as well so we're
- 12:29going to say bubbles. looped equals true
- 12:34all right so now let's go into the game
- 12:36and see and see our
- 12:41result all right and as you can see we
- 12:44can hear the sound coming specifically
- 12:47from this part and if we walk farther
- 12:49away from it we're going to hear the
- 12:51part less and less and so yeah the
- 12:53farther away we're walking from this
- 12:54part the less audible this sound is
- 12:57going to be but the further we walk
- 12:59walk up close to it then we're going to
- 13:01be hearing the sound yet again so we're
- 13:04going to be walking up just a little bit
- 13:07closer and now we hear the sound again
- 13:09so this basically works as intended our
- 13:11proximity sound effect is perfectly
- 13:14capable we were able to successfully
- 13:16create the sounds we want to create
- 13:17inside of our Roblox games and Implement
- 13:19them but what if let's say we had
- 13:22multiple different sounds that we wanted
- 13:24to play back to back and they also had a
- 13:28whole bunch of different properties that
- 13:30we wish we could just change within one
- 13:33sort of instance like let's say volume
- 13:35what if we wanted the volume to
- 13:36consistently be one throughout the
- 13:38entire thing and we want
- 13:41to and whatever sound we're playing
- 13:43through this group or category uh we'll
- 13:46just stop the whole thing entirely and
- 13:49then play it again once we want it to
- 13:51play again so one big example I can
- 13:54think of is m is music in general so if
- 13:58you have a whole bunch of sounds that
- 14:00are inside of a music category and let's
- 14:02say during specific parts of the game
- 14:04you want to play the music then you can
- 14:06play the music and if you want to just
- 14:08completely cut off all the music then
- 14:10you would do that using a group or if
- 14:12you have like a toggle option inside of
- 14:14settings where you want the music to be
- 14:16completely off then no music is going to
- 14:19be playing all of this can pretty much
- 14:21be done using an instance called a sound
- 14:24group and let me show you what that
- 14:25looks like so where would we usually so
- 14:28where would we put the sound group we
- 14:30would usually put it inside of a new
- 14:32service called sound service and this
- 14:35pretty much handles uh all the sounds
- 14:37that are generally being played inside
- 14:39of inside of your Roblox game but I've
- 14:42seen successful games that don't use
- 14:43sound service so you don't have to use
- 14:45this but it is but it is quite helpful
- 14:47because it shows a bunch of properties
- 14:49that have to do with manipulating
- 14:51General sounds inside of your game uh
- 14:54but for the purpose of this episode
- 14:56we're going to make a new sound group so
- 14:58let's hit the Plus sign and let's insert
- 15:01a sound group so this is what the sound
- 15:03group looks like and we can probably and
- 15:05we can pretty much just call this music
- 15:08and this only has one property which is
- 15:10volume I will get to this version of
- 15:13volume in a little bit but as of right
- 15:15now let's add some music inside of sound
- 15:16Service uh I'm I'm not going to grab
- 15:19actual music for copyright reasons but
- 15:21let's just insert a bunch of sounds
- 15:24inside of here all right I just inserted
- 15:26a bunch of sounds uh into my music
- 15:28folder and like I said sound groups
- 15:30aren't really that special it's
- 15:32basically just it's basically just a
- 15:34collection of sounds you can put inside
- 15:36of your game to which you can have
- 15:39easier access to specific sounds that
- 15:41you're looking for and you can modify
- 15:43them accordingly um this will come more
- 15:46in handy when we talk about sound
- 15:48effects but as of right now these are
- 15:50all basically placed inside of the same
- 15:51sound group for easy access so let's
- 15:54create a local script inside of starter
- 15:56GUI and let's look for our music sound
- 16:00group so we're first going to access our
- 16:02sound service so we're going to say
- 16:04local sound service equals game colon
- 16:08get service sound service now let's look
- 16:12for our music sound Group which is local
- 16:15music equals sound service wait for
- 16:19Child open parentheses close parentheses
- 16:22music Here's what we're going to do
- 16:25we're going to play a random sound or
- 16:27music from The Sound s group so let's
- 16:29pick a random number from one to however
- 16:32many sounds that are inside of the sound
- 16:34group so let's say local random num
- 16:37equals math.
- 16:40random one comma hashtag symbol music
- 16:45colon get children because we're trying
- 16:47to re we're trying to fetch a table not
- 16:50an instance so now let's go down here
- 16:53and let's actually get that sound so
- 16:56we're going to say local random
- 17:00sound sound equals music in hard
- 17:04brackets we're going to put in random
- 17:06num and now let's play that random sound
- 17:08so Random
- 17:10sound colon play open parentheses close
- 17:14parentheses okay I made a little typo
- 17:16here I'm trying to retrieve the music
- 17:18table not the actual instance when I'm
- 17:22trying to fetch the sound uh this can be
- 17:25more readable just by taking get
- 17:27children and putting it up here when
- 17:29we're declaring it that way we don't
- 17:30have to say get children every time so I
- 17:33think this makes it a little bit more
- 17:34readable now let's play the game and see
- 17:35what
- 17:37happens okay so when we joined in the
- 17:39game it played the original song uh now
- 17:42let's try playing it again and see and
- 17:44see if it changes to something
- 17:46different okay and now it's playing
- 17:47something different which is basically
- 17:50alarm sound
- 17:53effects okay and now it's playing a
- 17:54bunch of static sounds so this seems to
- 17:57work as intended whenever we join the
- 17:59game the game is going to automatically
- 18:01pick a sound from the music's group and
- 18:04just play it I think we pretty much got
- 18:06it to do what we wanted it to do now
- 18:08there's something interesting I want you
- 18:09to look at so if we go back to our sound
- 18:12group our music group I mentioned that
- 18:15there's only one property that's called
- 18:17volume now you might ask what's the
- 18:19difference between this volume and the
- 18:21volume that's inside of an individual
- 18:24sound like this one so if we remember
- 18:26back to what volume is for an an
- 18:28individual sound it's basically how loud
- 18:31or how quiet the sound is when it gets
- 18:34played so if it's a volume of zero
- 18:36obviously you're not going to be able to
- 18:37hear it so the default is 0.5 but you
- 18:40can also make it higher to let's say one
- 18:43to even as big as 10 so that's pretty
- 18:46much self-explanatory but what's sort of
- 18:48confusing about sound group sounds is
- 18:51that this volume changes the volume of
- 18:55every single sound that's inside of the
- 18:57sound group that part makes sense but
- 18:59there is something else that trips
- 19:01people up about this sound about this
- 19:03volume property this volume does not act
- 19:07as a Setter for all of these sounds to
- 19:10to just be whatever this volume is this
- 19:13acts as a multiplier to set the volume
- 19:17of whatever each audio is to amplify it
- 19:21to whatever this sound is so let's say
- 19:24we had this sound right here that's
- 19:26volume 0.5 if our multip lier is 0.5
- 19:30this is effectively saying we should
- 19:32take this volume and make the volume by
- 19:35half so 0.5 * 0.5 is 0.25 because a half
- 19:42of 0.5 is
- 19:440.25 and let's say we change this volume
- 19:47to one 0 0.5 also known as the half of 1
- 19:52is 0.5 so that's what this new volume is
- 19:55going to be when you play it and for
- 19:56other sounds it could be different if
- 19:58this volume is two then the volume of
- 20:01this is going to be one because half of
- 20:04two is 1 since we have this volume
- 20:07multiplier set to 0.5 now if we set this
- 20:10volume to two it's going to double the
- 20:13volume of each individual sound so if
- 20:15this is volume one then the volume of
- 20:18this is going to be two when we play it
- 20:20if this is two then the volume is going
- 20:23to be four and uh this one is going to
- 20:25be 1 because 0.5 *
- 20:29two is one so that's a very distinct
- 20:33feature about sound group volume that I
- 20:35want you to understand because people do
- 20:38get tripped up by it so I I want to say
- 20:40this one more time the sound group
- 20:42volume is a multiplier of all these
- 20:46different sounds it's not a Setter for
- 20:48all of these sounds to have the same
- 20:51volume as whatever this sound group
- 20:54volume property is set to and for the
- 20:57last part of this episode episode I'm
- 20:59going to do a brief introduction to
- 21:01sound effects I'm not going to go too
- 21:03much into detail with the technicalities
- 21:05maybe I'll do that in a future episode
- 21:07but basically a sound effect is a sound
- 21:10modifier to current sounds or music that
- 21:13you already have inside of your game so
- 21:16this can be found inside of our sound
- 21:18groups and it's convenient to have these
- 21:20in a sound group because we want to
- 21:22change we want to add a sound effect to
- 21:25every single sound that's inside of a
- 21:27sound group so so this is pretty much
- 21:29what it's going to look like let's hit
- 21:30the plus sign next to our sound group
- 21:32music and we can see that Roblox is
- 21:36suggesting us to add in a whole bunch of
- 21:38different sound effects so we have
- 21:40chorus we have Distortion pit shift
- 21:43revert Reverb Echo and equalizer but
- 21:47let's say we want to add in a chorus
- 21:48sound effect let's add that in and it's
- 21:50going to be dropped into our sound group
- 21:53alongside our other sounds so if we
- 21:56click on this we can see that there's a
- 21:57bunch of Stack here like depth Min
- 22:00priority rate I'm not going to go over
- 22:02these but I'm sure the default settings
- 22:04are good enough as of right now so it's
- 22:06pretty much as simple as that all we did
- 22:08was basically add in a sound effect into
- 22:10our sound group alongside our sounds and
- 22:13it'll automatically put that sound
- 22:15effect inside of these sounds when we
- 22:17play them so let's hit play and see and
- 22:20listen to our new
- 22:23sounds so it is kind of hard to notice
- 22:26but there is a sort of chorus or echoey
- 22:29sound effect to the sound that's being
- 22:32played right now let's try a different
- 22:34sound to see if we can hear it
- 22:37better so it's it's hardly noticeable
- 22:40but there is a very slightly echoey
- 22:42sound effect by the end of the sound
- 22:45that's being played that's basically a
- 22:46small introduction to sound effects that
- 22:48Roblox has provided for us to manipulate
- 22:51our sounds a little bit so I just think
- 22:53it's something pretty useful to have
- 22:54when you're using this alongside sound
- 22:56groups so that's pretty much going to
- 22:58sum up sounds sound groups and even
- 23:01sound effects as well I hope you found
- 23:02this episode to be helpful this is
- 23:04definitely going to be used very very
- 23:06very often I don't think I really need
- 23:08to say say anymore um sounds it's kind
- 23:11of just one of those things you need to
- 23:12have them in your Roblox game so I hope
- 23:14that when you watch this video and use
- 23:16this when you're making your Roblox
- 23:18games you will find this you will find
- 23:20this tutorial to be helpful to you and
- 23:22overall I just think that this is a
- 23:24really nice feature Roblox has added for
- 23:26us because it gives us easy access to
- 23:28audio
- 23:28using their entire audio library to add
- 23:32these sounds and music and just play
- 23:34them whenever we want to and I just
- 23:36think it's a neat feature to have all
- 23:37right well that's going to be it for
- 23:38this episode join my Discord server the
- 23:39link is in the description and I will
- 23:41see you in the next episode take care
About this transcript
This page contains the full transcript of Sounds & Sound Groups - Roblox Advanced Scripting #9 by BrawlDev, generated from the public captions YouTube serves with the video. The transcript has 4,333 words across 588 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.