Creating the Sell Location! Roblox Studio Simulator Guide Episode 14 — Transcript
Full transcript
- 0:00hey what's going on ladies and gentlemen
- 0:01hopefully having a great day in today's
- 0:02episode we are going to be going over
- 0:04how to create a cell location in your
- 0:06roblox simulator now as always if this
- 0:08video does help you guys out or you do
- 0:10enjoy it make sure you smash the like
- 0:11button also hit the subscribe button and
- 0:12turn this post notifications on if you
- 0:14want to be notified we'll upload more
- 0:15roblox development content additionally
- 0:16i do a patreon if you guys like to
- 0:18support me and gain access to all the
- 0:19scripts and the game file to make during
- 0:21this episode there's a link down below
- 0:22in description and you guys can go and
- 0:23check that out with that being said
- 0:25let's get into it so to show you guys
- 0:26what i actually mean by the cell
- 0:28location as we can see in eating
- 0:30simulator the simulator that we're
- 0:31recreating during the series they have a
- 0:33little cell location right here
- 0:34basically you can collect some food and
- 0:36then step on this part right here and
- 0:38then that will remove all of our food
- 0:39and give us some coins based off however
- 0:41much food we actually had additionally
- 0:43on the right side of our screen there's
- 0:44actually a little cell button which we
- 0:46can click on and that will teleport us
- 0:47directly onto the cell point as well so
- 0:49we'll be creating that too so going
- 0:51right into the studio and the project
- 0:52that we've been working on this entire
- 0:54time we can actually look inside of our
- 0:56workspace and we already have a folder
- 0:58called scriptable objects which contains
- 1:00the shop open and this is the part that
- 1:01whenever we step on this it actually
- 1:03displays the shop gy to us so what we're
- 1:05going to do is we're actually just going
- 1:06to duplicate this by selecting it and
- 1:08then hitting ctrl d and then we'll move
- 1:10it over a little bit just like that and
- 1:12then let's go ahead and rename this to
- 1:14cell and that'll indicate that this is
- 1:16the cell part now aesthetically you can
- 1:18create your cell part in many different
- 1:19ways what i find to be one of the
- 1:21easiest ways is going directly into the
- 1:23toolbox into the marketplace and make
- 1:24sure you're searching for models and
- 1:26then just search up cell now once you do
- 1:28that you'll see a bunch of different
- 1:29cell models pop up and you could choose
- 1:31any one of these i'm just gonna select
- 1:32the first one that i find and no we're
- 1:34not actually going to use the cell model
- 1:36what i'm really trying to find is a
- 1:37decal and what i want the decal for is
- 1:39actually for this specific circle so if
- 1:41we delete it we can see the circle goes
- 1:43away so that's what this person is
- 1:44actually using to create this little
- 1:46circle right here they're using a
- 1:48specific texture and they set the color
- 1:49to yellow so you could even have it a
- 1:51different color if you wanted to and
- 1:52then because of the specific texture is
- 1:54a circle exactly as we see right now we
- 1:56can put that onto any part that we want
- 1:58and then that'll give us the little
- 1:59circle effect that we're looking for
- 2:00i'll have this decal link in the
- 2:02description down below just in case
- 2:03you're unable to find the specific model
- 2:05in the toolbox you guys can go down
- 2:06there if you want to use this exact
- 2:08texture go back inside of the original
- 2:10cell part that we had add in a decal and
- 2:12then just go ahead and use that same
- 2:14specific texture now we're going to want
- 2:15to make sure that the face is actually
- 2:17on the top it also depends on how your
- 2:20part is laid out you could have this
- 2:21part upside down and then at the top
- 2:23might actually be the bottom but if you
- 2:24actually click on the face and change
- 2:26the face depending on where you move
- 2:27your mouse cursor that'll automatically
- 2:29adjust the face for you you could really
- 2:31just click the specific side that you
- 2:32want it on so we now have the decal on
- 2:34there we now want to adjust the color
- 2:35decide whatever color you want to we're
- 2:37just going to go with the yellow so i'm
- 2:38going to click yellow hit okay and now
- 2:40we're pretty much all good for that the
- 2:41next thing that we want to do is we want
- 2:42to actually add the cell text that we
- 2:44see on this part that we added in over
- 2:46here and we want to add that directly to
- 2:48our part as well so what we're going to
- 2:49do is we are going to get a billboard
- 2:51gui and then inside of the billboard gy
- 2:53we are going to get a text label now
- 2:55let's go ahead and make a few
- 2:56adjustments to the text label the text
- 2:57is going to be cell in all caps the text
- 3:00will also be scaled the color of the
- 3:02text is going to be a yellow so a yellow
- 3:06the background is going to be fully
- 3:07transparent and then we're also going to
- 3:08make the stroke not transparent so we
- 3:11see it just like that and now that's
- 3:12already pretty close we just need to
- 3:13make a couple more adjustments so we
- 3:15want to set the billboard g wide always
- 3:16on top so that we always see the
- 3:18billboard gui and it's not hidden by
- 3:19other parts now what we're going to do
- 3:21is inside of the billboard gui we want
- 3:23to actually adjust the size so we're
- 3:25going to first start by setting it to 1
- 3:26comma 0 comma 1 comma 0. that'll set it
- 3:29to 100 of the width and the height then
- 3:31we also want to do the same with the
- 3:32text labels so inside of here we're
- 3:34gonna say size we're gonna set it to one
- 3:36comma zero comma one comma zero and now
- 3:38it is pretty small so what we're gonna
- 3:39do is back inside of the billboard gui
- 3:41we're going to continue adjusting the
- 3:43size until we find something that we
- 3:44like we'll try two in the x and that
- 3:46still seems a little bit small i think
- 3:48we want it to be a little bit larger so
- 3:49we could go with three three and then
- 3:51let's adjust the y to two i think that's
- 3:54still slightly too small so we'll go
- 3:56with 3.5 and 2.5 okay i think that's
- 4:00good i'm not entirely sure if that's
- 4:03great size you guys can kind of judge
- 4:04that for yourself additionally back
- 4:06instead of the text label let's go to
- 4:07the font and my favorite font my go-to
- 4:09font is always the gotham you guys
- 4:11probably already know that we're going
- 4:12to go with gotham semi-bold i think that
- 4:14looks pretty decent now back inside of
- 4:16the billboard gui let's go to the offset
- 4:18and what we're gonna look for
- 4:19specifically is the studs offset and
- 4:21that'll basically reposition this around
- 4:23the part depending on what offset we
- 4:25actually give it so we probably want to
- 4:26adjust this to either one which yeah i
- 4:28think we're gonna probably want like a
- 4:31two i think that looks good because
- 4:32remember we want this to be above the
- 4:34yellow circle we're not really caring so
- 4:36much about the part and while we're
- 4:37talking about that let's go back to the
- 4:39part and change the transparency to one
- 4:41so now that becomes completely invisible
- 4:43and with all that being said i think
- 4:44that looks pretty good it looks like how
- 4:46theirs looked at least or at least very
- 4:48similar the final thing that we want to
- 4:50do is go back inside of the billboard
- 4:51gui and change the max distance to
- 4:54something probably like 50 maybe it
- 4:56really depends what that means is if we
- 4:58get 50 studs away from that billboard gy
- 5:01this will no longer be displayed to us
- 5:03so if you want them to see it from
- 5:04further away you can make it a hundred i
- 5:06would not recommend leaving it at
- 5:07infinite though because they could
- 5:09literally see it all the way across the
- 5:10map and that's probably not what you
- 5:12want to do also i'd recommend that you
- 5:13change your current viewport to
- 5:15something like the iphone or something
- 5:16like that just to verify that it does
- 5:18look good on all the different devices
- 5:20and it does look fine on mobile as well
- 5:21so we don't have to even worry about
- 5:23that the last thing that we want to do
- 5:24is we want to position this part so as
- 5:26we can see there is a shadow below the
- 5:28circle and it doesn't look like the
- 5:29circle is actually on the ground it
- 5:31looks like it's floating which is
- 5:33probably not something that we want and
- 5:34we can see with this part this part is
- 5:36in the ground so what we can do is we
- 5:38can just move this like that and that
- 5:41will be good and one thing to consider
- 5:43is remember the way that this is going
- 5:44to be set up when we script it is
- 5:46whenever the player touches this
- 5:47specific part they will sell all their
- 5:50current food and receive coins because
- 5:52of what we just did which we basically
- 5:53lowered the part almost entirely into
- 5:56the ground you could experience certain
- 5:58issues like the player not touching this
- 6:00specific part because of how low to the
- 6:02ground it actually is and that could
- 6:03cause some issues for our script to not
- 6:05get triggered an alternative that we can
- 6:07do which is really simple is duplicate
- 6:09this part put this part inside of the
- 6:11same part delete the decal on the main
- 6:13part which is holding this one and then
- 6:15we can just rename this one like fake
- 6:17for example and then we're gonna remove
- 6:18the billboard gui and now we're gonna do
- 6:21is move the fake part up right so this
- 6:24part is going to be above the ground and
- 6:26then the fake one which is inside of our
- 6:28main part is gonna be down here so there
- 6:31we go so now when we set up our script
- 6:32we're gonna set it up so the player
- 6:34touches this specific part and if you're
- 6:36not exactly understanding let's look at
- 6:38it this way this part is completely
- 6:40above the ground right so anybody can
- 6:42easily walk onto this part let's go
- 6:44ahead and make that transparent again
- 6:45and then let's make this one not
- 6:47transparent so now when we see this one
- 6:49this one's entirely in the ground where
- 6:50you could possibly run into issues of
- 6:52the player not being able to touch it
- 6:54because it's so far or so close to being
- 6:56completely through the ground so what we
- 6:58did is we basically created a fake part
- 7:00which just holds the decal to display
- 7:02the specific circle and that's inside of
- 7:04the part that we're using to basically
- 7:05track the player's touch and then also
- 7:07depending on how you feel if you think
- 7:09that the billboard gui seems to be a
- 7:10little bit too far above the circle now
- 7:12you could also parent that to the fake
- 7:14part as well so now the billboard gui's
- 7:16positioning is based off of this
- 7:17specific part which of course is lower
- 7:19than the cell part and we're now pretty
- 7:20much done with creating this part if you
- 7:22did want to be a little bit more
- 7:23creative and add more effects to the
- 7:25specific part what you could do is you
- 7:26could add either a particle emitter or
- 7:28one of the lighting objects to make it a
- 7:30little bit more cool or make it stand
- 7:32out a little bit more realistically this
- 7:33tutorial is mostly made to show you how
- 7:35to do the scripting and stuff like that
- 7:36but if you guys want to get more
- 7:37creative and play around with these
- 7:38different things you guys certainly can
- 7:40with all that being said we are now
- 7:41going to delete the part that we
- 7:43originally brought into our game now
- 7:44scripting this is rather simple because
- 7:46we already did something like that for
- 7:48the shop open so what we're gonna do is
- 7:50go inside of the server script service
- 7:51look inside of the scriptable object
- 7:53script that we already have and we can
- 7:54see that we made the shop open right
- 7:56here what we're gonna do is we're simply
- 7:58going to copy and paste this and if you
- 8:00guys haven't watched this episode i'll
- 8:01quickly explain exactly what we're doing
- 8:03inside of the workspace we're literally
- 8:04looking for the scriptable objects
- 8:06folder which is this folder right here
- 8:07so when we get the photo we look for the
- 8:09shop open part and then we use the
- 8:10touched event and connect that to a
- 8:12function right here every time this part
- 8:14is touched it's going to pass us the
- 8:15part which touched it and then we're
- 8:17going to get the player from that
- 8:18specific parts parent and then we use
- 8:20the get player from character function
- 8:22to get the player from the character
- 8:23which the character should be the parts
- 8:25parent that touched this specific part
- 8:27if we do get the player then we call the
- 8:28shop open remote and we fire that to the
- 8:30player and then we also print that it
- 8:32did work so that's exactly what we do
- 8:33with the shop open part i'm going to
- 8:35remove that print statement and what
- 8:36we're going to do this time is instead
- 8:37of the shop open we're going to use the
- 8:39cell part so scriptable objects folder
- 8:41and then this time the cell part we're
- 8:42going to use the same exact function as
- 8:44the get player and then if player we
- 8:46actually want to reward them a specific
- 8:47amount of coins we want to get the
- 8:48rewards module script that we made a
- 8:50couple episodes ago so what we're going
- 8:51to do is we're going to say local server
- 8:53script service equals game get service
- 8:57server script service just like that and
- 8:59then local rewards equals require
- 9:03service script service dot utils dot
- 9:05rewards now we got the rewards module
- 9:07and we're then going to say rewards dot
- 9:09coins because we want to give the player
- 9:11coins and we are going to pass through
- 9:13the player the amount of coins that we
- 9:14want to give the player is based off of
- 9:16how much food that they have oh and it
- 9:18looks like we slightly messed up the
- 9:19name in the rewards so there we go
- 9:21that's all fixed now so the amount of
- 9:22coins that we want to reward the player
- 9:23is based off how much food we have so to
- 9:25get their food we're going to say
- 9:29player.leaderstats.food.value and that's
- 9:30going to return the current amount of
- 9:32food that they actually have and now we
- 9:33got to decide do we want to use their
- 9:35coin multiplier i think the coin
- 9:36multiplier can be acquired from
- 9:38different ranks and probably the pet
- 9:40system this is entirely up to you though
- 9:42based on your game do you want to use
- 9:43the coin multiplier or do you not want
- 9:45to use the coin multiplier we are going
- 9:47to say that we do want to use the coin
- 9:48multiplier and then the last thing that
- 9:50we want to do is we want to set the
- 9:52player's current food value so we're
- 9:53going to copy this and then we're going
- 9:55to set the player's current food value
- 9:57to zero because we want to reset the
- 9:58amount of food that they currently have
- 10:00and then of course we're not going to
- 10:01use this remote so we're going to go
- 10:02ahead and delete that and now that
- 10:04should be all good also make sure that
- 10:05you reset the player's food after
- 10:07rewarding them the coins because we need
- 10:08that number to specifically reward the
- 10:10player with that amount of coins so
- 10:12let's go ahead start up our game and see
- 10:14if this works so we're gonna go ahead
- 10:15and get some food we now have 10 food
- 10:17walk over to the sell point and now we
- 10:18see we actually just got some coins so
- 10:20let's do it again and now the coins have
- 10:22been added to our balance and that works
- 10:24exactly as it should perfect we might be
- 10:26able to optimize this function a little
- 10:28bit more so what we could do is we can
- 10:29create a variable inside of here saying
- 10:31food and then we can set that to this
- 10:33value right here and then what we can do
- 10:35is we can say if food is greater than
- 10:37zero then and now we'll only call this
- 10:39function if the player actually has food
- 10:41to sell and then instead of getting the
- 10:43value this way we could just say food
- 10:45because now we know how much food they
- 10:46exactly have so the cell part is
- 10:48completely set up at this point we're
- 10:50all done with that what we're now gonna
- 10:51do is set up the little cell button in
- 10:53the gui go into the starter gy we're
- 10:55just gonna duplicate the currency gui
- 10:57and rename this two buttons for now we
- 11:00might adjust it to the future let's now
- 11:01go inside of the currency holder and
- 11:04we're actually just gonna go ahead and
- 11:06grab the purchase button out of here so
- 11:08i'm just gonna move that and put that
- 11:09into the currency holder we can go ahead
- 11:11and then delete the coins and the food
- 11:13let's also go inside the currency holder
- 11:14and change the background transparency
- 11:16property to zero so that we could easily
- 11:18move this across our screen because
- 11:21that's exactly where we want it and now
- 11:22they have it lined up on the right side
- 11:24of their screen slightly off of the side
- 11:28so i would say probably something like
- 11:30that their buttons are also relatively
- 11:32small so we probably want to adjust it
- 11:35to i'd say about that size that's pretty
- 11:37good we'll also rename purchase to sell
- 11:40and then we want to adjust the size to
- 11:44maybe one comma zero comma point five
- 11:47comma zero that's a decent size i'm not
- 11:50gonna lie so then we'll make the
- 11:51background transparency of the currency
- 11:53holder one so that it's invisible and
- 11:55that looks pretty good we don't want to
- 11:56change the text on the cell button to
- 11:59sell in all caps and now i'd say that
- 12:01looks nearly identical to how they have
- 12:03it set up what we can then do is we can
- 12:05duplicate this one time and we can
- 12:06change the text from cell to go small
- 12:09and that's their second button that they
- 12:10have and that looks pretty good because
- 12:12we still have the ui list layout right
- 12:14there so in the future when we do add
- 12:15the go small functionality and then also
- 12:17the shop the codes and all the other
- 12:19buttons that they have there we can most
- 12:20likely just add it to this gui right
- 12:22here and we shouldn't have any issues
- 12:24we're not going to actually add the
- 12:25ghost small button yet just because
- 12:26we're simply not going to use it we'll
- 12:28add that in the future when we do add
- 12:29the functionality though let's then
- 12:30rename the currency holder to button
- 12:32holder and there we go we can then open
- 12:35up the manager script right here and
- 12:36then what we want to do is we want to
- 12:37rename the currency gui from currency
- 12:40gui to button gui and then we no longer
- 12:43have the currency holder we now have the
- 12:44button holder so we want to rename this
- 12:47as well from currency to button holder
- 12:50and now we only have one button which
- 12:52the button is called sell so we're gonna
- 12:54find cell inside of the bun holder frame
- 12:56and we'll rename the food frame to sell
- 13:00button and then we can delete this and
- 13:01we can pretty much delete all of this as
- 13:03well then what we can do is we can say
- 13:05cell bun dot mouse button one click
- 13:07colon connect function and now we got to
- 13:09decide what we want to do when we click
- 13:11this button so what we want to happen is
- 13:12we want to teleport the player directly
- 13:14to the cell location now the way that we
- 13:16actually do this is by getting the
- 13:18workspace so we're going to say local
- 13:19workspace equals game get service
- 13:22workspace and then using the workspace
- 13:24we want to locate the cell part that we
- 13:26have right inside of here now the way
- 13:27that we can do that is by saying local
- 13:30cell part equals workspace wait for
- 13:33child scriptable objects another wait
- 13:35for child cell and then that will give
- 13:37us the cell part now inside of the mouse
- 13:39button one click function what we want
- 13:41to do is we want to say local character
- 13:43equals player dot character and then we
- 13:45want to check if we found the character
- 13:47we then want to do character set primary
- 13:50part c frame which basically the
- 13:51character is a model and each model can
- 13:54have a primary part and the default
- 13:56characters always have a primary part
- 13:57set for them and then what we're doing
- 13:59with the c frame is the c frame is
- 14:01actually the positioning of the player's
- 14:03character so we're basically teleporting
- 14:04the player's character to specific
- 14:06coordinates so we're going to use the
- 14:07set primary part c frame method and then
- 14:10we're going to provide the c frame and
- 14:11to get the c frame what we're going to
- 14:12do is we're going to use the cell part
- 14:14so we're going to say cellpart.c frame
- 14:16and that's going to give us the c frame
- 14:17for exactly where the cell part at which
- 14:19is basically the location of the cell
- 14:21part and now before we test this what we
- 14:22can do is we can just go ahead and add
- 14:24in a quick print statement so we're just
- 14:26going to say print true and print true i
- 14:28like to do this when i'm testing out new
- 14:30code because if there are some issues in
- 14:31here like because for some reason maybe
- 14:33this function isn't teleporting us at
- 14:34all so this will easily allow for us to
- 14:36identify if the function is actually
- 14:38getting to this method call right here
- 14:39or say it's stopping right here because
- 14:41we didn't find the player's character i
- 14:43believe that this function that we have
- 14:44set up right now is basically completely
- 14:46guaranteed to work so realistically this
- 14:47debugging isn't required but i think
- 14:49it's really good to show you guys what i
- 14:51do sometimes because it might help you
- 14:52guys in the future anyways we're then
- 14:54going to start our game and see if this
- 14:55works so we have the cell button on the
- 14:57right side of our screen let's go ahead
- 14:58and click it and we see we just got
- 14:59teleported directly to the cell part
- 15:01let's go ahead and click a few times get
- 15:03some food click the sub button and we
- 15:04see we just got teleported to the saw
- 15:06part so that works exactly as it should
- 15:08so this works perfectly the last thing
- 15:10that we want to do is we want to
- 15:11actually add a cool down to using the
- 15:12cell button let's go ahead and remove
- 15:14these print statements right here and
- 15:16what we can do is we'll create another
- 15:18variable called cooldown equals false at
- 15:20the top of this function we're going to
- 15:21say if cooldown equals true then return
- 15:25end and what this means is that if the
- 15:27cooldown is set to true it's going to
- 15:29stop running the function and it's not
- 15:30going to go down to here at all so this
- 15:32function will only run if cooldown
- 15:34equals false let's actually rename this
- 15:36variable from cooldown to on cooldown
- 15:38because that might make it a little bit
- 15:40easier to understand so now we want to
- 15:41do is whenever we actually teleport the
- 15:43player we want to set on cooldown to
- 15:45true to prevent the player from using
- 15:47this once again and then after we
- 15:48teleport the player what we then want to
- 15:50do is we want to say task.wait three
- 15:52seconds because that's the cooldown and
- 15:54then once these three seconds are up
- 15:56we're gonna set cooldown back to false
- 15:58so that the player is no longer on
- 16:00cooldown so let's go ahead and start
- 16:01this up and see if it works so let's
- 16:03click the button we can see that we got
- 16:04teleported let's try to click it again
- 16:06it's not working but then after the
- 16:08three seconds is up it works once again
- 16:10so we're doing the same thing and that
- 16:11works exactly as it should the last
- 16:13thing that we want to do is want to
- 16:14actually adjust the button to display
- 16:16how many seconds the player has to wait
- 16:17before the cooldown expires so what
- 16:19we're going to do is we are going to
- 16:21remove the test.wait and we're going to
- 16:22create a new variable called cooldown
- 16:24and that's going to be equal to 3
- 16:25because we want the cooldown to be three
- 16:27seconds then we're going to create a
- 16:28while loop so we're going to say while
- 16:29cooldown is greater than zero and what
- 16:31we're actually going to do is we're
- 16:32going to say selbon.txt
- 16:35equals cooldown so this will change the
- 16:37cell bonds text to the actual cooldown
- 16:39then at the bottom we want to say
- 16:40task.wait one so that'll wait one second
- 16:43each time we loop through and then we
- 16:44want to say cooldown minus equals one so
- 16:47that we subtract one from the cooldown
- 16:48every single time this loop goes through
- 16:50and then the final thing that we want to
- 16:52do is we want to change the cell bun.txt
- 16:54after the cooldown expires to sell once
- 16:56again so let's go ahead and start our
- 16:58game and test this out so let's hit the
- 16:59sell button three
- 17:01two one
- 17:02sell so now we're able to sell again and
- 17:04let's see let's make sure that it's all
- 17:05working properly and it looks to be and
- 17:07yeah that works exactly as how it should
- 17:09be perfect anyways ladies and gentlemen
- 17:11that's gonna be it for this episode
- 17:12hopefully it did help you guys out as
- 17:13always if it did make sure you smash
- 17:14like button also hit the subscribe
- 17:15button and turn suppose notifications on
- 17:17if you want to get notified when i
- 17:18upload more roblox development content
- 17:20additionally i do have a patreon if you
- 17:21guys like to gain access to all the
- 17:22scripts and the game file that i made
- 17:24during this episode there's a link down
- 17:25below in description you guys go check
- 17:26it out with that being said i hope that
- 17:28you guys have a great day and i'll see
- 17:29you guys in the next episode
About this transcript
This page contains the full transcript of Creating the Sell Location! Roblox Studio Simulator Guide Episode 14 by MonzterDEV, generated from the public captions YouTube serves with the video. The transcript has 4,512 words across 597 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.