YouTube2Text

Setting the Max Food! Roblox Studio Simulator Guide Episode 15 — Transcript

by MonzterDEV · 4,901 words · 640 segments · language en · Watch on YouTube

Full transcript

  1. 0:00what's going on ladies and gentlemen
  2. 0:00welcome back to the simulator series in
  3. 0:02today's episode we're going to be
  4. 0:03setting the maximum amount of food that
  5. 0:05a player can hold as always if you guys
  6. 0:06do enjoy the video or it does help you
  7. 0:08out make sure you smash the like button
  8. 0:09also hit the subscribe button and turn
  9. 0:10this post notifications on if you want
  10. 0:12to get notified when i upload more
  11. 0:13roblox development content additionally
  12. 0:14i do have patreon if you guys like to
  13. 0:16support me and gain access to all the
  14. 0:17scripts and the game file that i make
  15. 0:19during this episode there's a link down
  16. 0:20below in the description and you guys
  17. 0:21can go and check that out with that
  18. 0:22being said let's get into it currently
  19. 0:24in our game we can actually purchase or
  20. 0:26equip different dnas which are meant to
  21. 0:28set the max limit of food that we can
  22. 0:30actually hold and when we equip a new
  23. 0:31dna we can see that the limit doesn't
  24. 0:33actually change for how much food we're
  25. 0:35able to hold additionally when we do get
  26. 0:37food we can see that we're able to go
  27. 0:39way past the limit so right now we're at
  28. 0:4075 over 50 and we can keep going over
  29. 0:42that limit and that's what we want to
  30. 0:44fix today if we take a look at eating
  31. 0:46simulator the simulator that we're
  32. 0:47actually recreating we can see that
  33. 0:48whenever we get food we actually don't
  34. 0:50go over our maximum limit which right
  35. 0:52now is 30. additionally whenever the
  36. 0:54current food that we have is equal to
  37. 0:56the max a notification pops up in the
  38. 0:57middle of our screen with two buttons
  39. 0:59that we could either sell or go to the
  40. 1:01shop and it also allows us to purchase
  41. 1:02the infinite food storages here as well
  42. 1:04so that's what we're going to be
  43. 1:05recreating today so the first thing that
  44. 1:07we want to do is we want to modify our
  45. 1:08currency gui to actually display the
  46. 1:11maximum amount of food a player can have
  47. 1:13to do this we want to go inside of the
  48. 1:14starter gui the currency gui and then
  49. 1:16open up the manager now looking inside
  50. 1:18the manager we can see that we have the
  51. 1:19change value function which actually
  52. 1:21sets the text on the text labels and we
  53. 1:24can see for the food frame to the amount
  54. 1:25slash and then 50. so this is the number
  55. 1:27that we want to change so that it
  56. 1:28doesn't display 50 it displays the
  57. 1:30maximum food the player can currently
  58. 1:32hold now the first thing that we want to
  59. 1:33do is we want to figure out how much
  60. 1:35food the player can currently hold based
  61. 1:36off their currently equipped dna so what
  62. 1:38we want to do is we want to get the
  63. 1:40replicated storage so local replicated
  64. 1:42storage and now that we have the
  65. 1:44replicated storage we can actually get
  66. 1:46the dna config directly from there so
  67. 1:48we're going to say dna config equals
  68. 1:50require replicated storage wait for
  69. 1:52child config wait for child dna config
  70. 1:55and now we have the dna config now let's
  71. 1:56create a function for getting the
  72. 1:58maximum food the player can actually
  73. 2:00have we're going to say local function
  74. 2:02get max food and that's not going to
  75. 2:04take any arguments now the way that
  76. 2:06we're going to figure this out is we're
  77. 2:07going to loop through the dna config
  78. 2:08table we're going to say local
  79. 2:09underscore dna in ipairs dna config do
  80. 2:14and we can actually rename dna to config
  81. 2:17because remember when we loop through
  82. 2:18the dna config what we're getting is
  83. 2:20this config line right here then we'll
  84. 2:22get this config line right there and
  85. 2:23then that config line as well so that's
  86. 2:25what we're getting every single time we
  87. 2:26go through the loop so with this we then
  88. 2:28want to check if the config dot id
  89. 2:31equals and now we want to see if the
  90. 2:33config id is equal to the dna the player
  91. 2:35currently has equipped and we can figure
  92. 2:37out the player's currently equipped dna
  93. 2:39by saying player dot inventory dot
  94. 2:42equipped dna dot value and that will
  95. 2:45give us the dna that the player
  96. 2:46currently has equipped and if they are
  97. 2:48equal then we know that the config.stat
  98. 2:50is the player's maximum food now what
  99. 2:52we're gonna do with this number is we're
  100. 2:53actually to create a new variable up
  101. 2:55here and that's going to be called
  102. 2:56maxfood and for right now we're just
  103. 2:58gonna set that to zero but then whenever
  104. 3:00we call this function we're gonna modify
  105. 3:01the max food variable and set that to
  106. 3:03the config.stat and that will give us
  107. 3:05the correct the maximum food the player
  108. 3:07can currently hold instead of saying the
  109. 3:08player's maximum of food is always 50 we
  110. 3:10can remove that number then we can do
  111. 3:12dot dot and say max food and that will
  112. 3:14now display the correct max food we're
  113. 3:16still not done yet though what we then
  114. 3:17need to do is we need to listen for
  115. 3:19every single time the player equips a
  116. 3:21brand new dna item the reason for that
  117. 3:22is because every single time the player
  118. 3:24equips a new dna item that's going to
  119. 3:26affect the player's maximum food and the
  120. 3:27way that we're going to do this is we
  121. 3:29are just going to use the same directory
  122. 3:31right here and we're going to use the
  123. 3:32same event that we do right here we
  124. 3:33currently listen for the food object to
  125. 3:35change and this time what we're going to
  126. 3:36do is we're going to actually listen for
  127. 3:38the equip dna object to change so we're
  128. 3:40going to say dot change and then we're
  129. 3:42going to create a function inside of
  130. 3:43here and then we're going to do is we
  131. 3:44want to say get max food instead of
  132. 3:46actually calling us get max food we
  133. 3:48could just say set max food because
  134. 3:49that's what it actually does so set max
  135. 3:52food and then what we need to do is we
  136. 3:53then need to call the change value
  137. 3:55function so it actually updates on the
  138. 3:57player's screen so we're going to say
  139. 3:58change value and we're just going to
  140. 4:00pass through food and we'll pass through
  141. 4:01the player's current food value which is
  142. 4:03right here and now when the script first
  143. 4:04starts up what we want to do is before
  144. 4:06we change the values we actually want to
  145. 4:08set the max food so that when the value
  146. 4:10gets changed at first it'll display the
  147. 4:12correct max food and now we should be
  148. 4:14able to test this out and have no issues
  149. 4:15so let's go ahead and start up our game
  150. 4:16and now we see when we load in our max
  151. 4:18food is three and our current food is
  152. 4:20507 so that works exactly as it should
  153. 4:23now let's go into the shop let's go into
  154. 4:25the dna and change the dna that we
  155. 4:27currently have equipped and we can see
  156. 4:28now that we bought the first dna which
  157. 4:30gives us a max food of one we now have
  158. 4:32the max root of one displayed on our
  159. 4:33screen as well so this works perfectly
  160. 4:35for two for three and everything else
  161. 4:37like that that is awesome what we then
  162. 4:39probably want to do is we probably want
  163. 4:40to modify the dna config we probably
  164. 4:42don't want the maximum of food to be one
  165. 4:44we probably want it to be something like
  166. 4:451 50 and 100. you can do whatever you
  167. 4:48want to but i think this will be a
  168. 4:50little bit better for improving the
  169. 4:51example and how it looks and we can test
  170. 4:53this once again just to make sure that
  171. 4:54everything did change so we now see 507
  172. 4:56out of 100 if we equip another dna
  173. 4:58that's 50 and this should be 10 and
  174. 5:00there we go that works exactly as it
  175. 5:02should perfect so now we're pretty much
  176. 5:03done with the currency gui now on the
  177. 5:05server side we actually want to limit
  178. 5:07the amount of food the player can
  179. 5:08actually receive and we don't want the
  180. 5:10player to go above their maximum food
  181. 5:11limit the way that we're going to do
  182. 5:12this is by going into the server script
  183. 5:14service going into utils and opening up
  184. 5:16our rewards module script now inside of
  185. 5:18here is where we actually reward the
  186. 5:19player food this is the method that's
  187. 5:21always going to be called for whenever
  188. 5:22we do it so that's why we're choosing to
  189. 5:24enforce the maximum limit inside of here
  190. 5:26because then every single time we reward
  191. 5:27the player food for whatever way we
  192. 5:29decide to do it they will never go above
  193. 5:31their limit which is exactly what we
  194. 5:32want to prevent so now we need to figure
  195. 5:34out the maximum amount of food based off
  196. 5:36the player's currently equipped dna and
  197. 5:37we actually did that in our currency gui
  198. 5:39manager with the set max food what we're
  199. 5:41going to do is we're actually going to
  200. 5:42copy this function we'll paste it right
  201. 5:44into here instead of saying set max food
  202. 5:46we're actually going to say get max food
  203. 5:47and this time we will just return the
  204. 5:50config.stat rather than setting a
  205. 5:52variable and now we have two errors we
  206. 5:53have one the dna config and the player
  207. 5:55so what we want to do is we want to add
  208. 5:57a player argument right here and now we
  209. 5:59need the dna config and we can go ahead
  210. 6:00and easily get the dna config by doing
  211. 6:02it the same way that we did in our local
  212. 6:04script so we now have the dna config but
  213. 6:06to optimize this a little bit more
  214. 6:07instead of using wait for child we are
  215. 6:09going to use periods because we can
  216. 6:11since we're on the server side with this
  217. 6:13and there we go now a quick note you
  218. 6:14might be thinking monster shouldn't we
  219. 6:16put this function inside of a module
  220. 6:17script because we're using it in one
  221. 6:19script and then we're using it in
  222. 6:20another script and realistically i have
  223. 6:22already thought about that and yes you
  224. 6:23definitely could the thing is though is
  225. 6:25that since this function is shared
  226. 6:27between the client and the server if we
  227. 6:28look inside the replicated storage we
  228. 6:30haven't created any utility module
  229. 6:31scripts yet those are currently inside
  230. 6:33of the server script service so the
  231. 6:35client can't access any of these current
  232. 6:37utilities so that would require us to
  233. 6:39create a utilities folder inside of the
  234. 6:40replicate storage then create a
  235. 6:41utilities module script and in my
  236. 6:43opinion for one specific function i
  237. 6:44don't think it's worth going through all
  238. 6:46the extra work especially for only using
  239. 6:48this function in two different locations
  240. 6:50it really doesn't seem necessary anyways
  241. 6:52with that all being said now let's look
  242. 6:53inside of the food method the way that
  243. 6:54we determine the amount of food that
  244. 6:56we're going to give to the player is
  245. 6:57multiplying the amount by the multiplier
  246. 6:59and then the result from this equation
  247. 7:00right here we added to the player's
  248. 7:02current food value we want to create a
  249. 7:03new variable called total and we're
  250. 7:05actually going to set that to pretty
  251. 7:07much exactly what we have right here so
  252. 7:08we can copy and paste that up here and
  253. 7:10what we're going to do to make sure that
  254. 7:11we get this equation correct is we're
  255. 7:13going to scrounge amount times
  256. 7:14multiplier in parentheses although i
  257. 7:16don't think you actually need to do that
  258. 7:17because of pemdas but i'm not amazing at
  259. 7:19math so i'm gonna do that anyway and
  260. 7:21then rather than saying plus equals
  261. 7:22we're just gonna say plus so what that's
  262. 7:24going to do is it's going to set this
  263. 7:26variable to this number plus the result
  264. 7:28of this equation right here so and
  265. 7:29that's exactly what we're doing right
  266. 7:31down here it's just written a little bit
  267. 7:32differently now that we have the total
  268. 7:34we want to get the max amount of food
  269. 7:35that the player can actually hold so
  270. 7:36we're going to say local max equals get
  271. 7:38max food and we're going to pass through
  272. 7:40the player then we want to check if the
  273. 7:41total is greater than max so if the
  274. 7:44player is unable to hold that amount of
  275. 7:46food without going over the limit then
  276. 7:48what we want to do is we want to set the
  277. 7:50player's current food value directly to
  278. 7:52the maximum amount of food that they can
  279. 7:54hold so we don't go over that limit
  280. 7:56otherwise we're able to set the player's
  281. 7:57food to the total because that would be
  282. 7:59under or equal to the max amount of food
  283. 8:01so we can go ahead start up the game and
  284. 8:03test this out see if it all works
  285. 8:04currently since i started the game we
  286. 8:05have 507 food but let's go ahead and
  287. 8:07clear our food and now start using our
  288. 8:08french fry and we can see we're not able
  289. 8:10to go over 10 out of 10. and we can see
  290. 8:12we can keep doing this selling our food
  291. 8:13and we can see we're never actually
  292. 8:15going above 10 food which is exactly
  293. 8:17what we want we could even test this a
  294. 8:19little bit differently so if instead of
  295. 8:20getting three foodies time we can do
  296. 8:22with just one food to make sure the same
  297. 8:23result happens so let's go ahead and do
  298. 8:25that and we can see that our food is
  299. 8:26hard limited to 10 and we're not able to
  300. 8:28go above that number and that's exactly
  301. 8:30what we want amazing the final thing
  302. 8:31that we want to do is we want to add
  303. 8:33that gui notification that pops up on
  304. 8:35the screen when the player's food is
  305. 8:37equal to the max amount of food that
  306. 8:38they can actually hold so inside of the
  307. 8:39replicate storage let's open up remotes
  308. 8:41and we can create a new remote event and
  309. 8:43we don't need to put that in the shop
  310. 8:45folder we'll just put that in the remote
  311. 8:46folder and we'll rename that to max food
  312. 8:48you can rename this to a couple of
  313. 8:50different things like full food or food
  314. 8:51max like there's a bunch of different
  315. 8:53ways that you can write this we're just
  316. 8:54going to say max food and that'll notify
  317. 8:56the player that they're holding the
  318. 8:57maximum amount of food that they can and
  319. 8:58now what we want to do is we want to get
  320. 9:00the remote folder so we're going to say
  321. 9:01local remotes equals replicate storage
  322. 9:03dot remotes and now we can use that and
  323. 9:05we can say remotes dots max food fire
  324. 9:08client and then we can pass through the
  325. 9:10player so now we'll notify the player
  326. 9:12anytime they have the max amount of food
  327. 9:13and now we need to hook this up on the
  328. 9:15client so let's go ahead inside of the
  329. 9:16star gui create a new screen gui you can
  330. 9:19rename this to max food max food
  331. 9:20notification it really doesn't matter
  332. 9:22and then what i'm going to do is inside
  333. 9:23of the shop folder inside of the shop gy
  334. 9:26we have this confirmation gui that we
  335. 9:27created a little while ago i'm going to
  336. 9:29copy this and then i'm going to paste
  337. 9:31that directly into the max food screen
  338. 9:33gui and now let's go ahead and make this
  339. 9:35visible so we can see this and now that
  340. 9:37we're looking at this screen gui we can
  341. 9:38see that it shares a lot of similarities
  342. 9:40with the gui that we actually want to
  343. 9:42create so that's why i'm using this
  344. 9:43confirmation gui right here because it
  345. 9:45allows us to do a lot less work and not
  346. 9:47have to configure so many different
  347. 9:48things because we already have most of
  348. 9:50it already created so we can rename the
  349. 9:51frame from confirmation to just frame it
  350. 9:53really doesn't matter then the text
  351. 9:54label we can modify and we can say max
  352. 9:57food exclamation mark and we probably
  353. 9:59want there to be two different text
  354. 10:01labels so we can probably like move this
  355. 10:03one up a little bit and i think that's
  356. 10:06pretty good and then let's make sure
  357. 10:08that we center it so
  358. 10:100.5.5 there we go that's centered and we
  359. 10:13can rename the text label from text
  360. 10:15label to title and we should change the
  361. 10:17font from source to probably gotham bold
  362. 10:20maybe gotham black i think gotham
  363. 10:22black's probably what we want to do and
  364. 10:23now we want to duplicate the title and
  365. 10:24we can rename this to
  366. 10:26just the message really doesn't matter
  367. 10:28and then we want to move this down a
  368. 10:30little bit so we'll move this down to
  369. 10:31like right here i think that's pretty
  370. 10:33good i actually want to make this a
  371. 10:34little bit smaller so
  372. 10:36something like that let's make sure that
  373. 10:38it is centered so 0.5.5 there we go and
  374. 10:41then we want to change the text of this
  375. 10:42to sell your food or upgrade your dna
  376. 10:47exclamation mark that looks pretty good
  377. 10:49but i think we might want to move it a
  378. 10:50little bit closer to the title like that
  379. 10:53let's check on mobile see if it looks
  380. 10:54good yup everything looks pretty good so
  381. 10:56now what we want to do is instead of
  382. 10:58calling this a confirmation button we
  383. 10:59can call this the sell button and we
  384. 11:01probably want to move this up a little
  385. 11:03bit more so something like that i would
  386. 11:05say and then the text we want the text
  387. 11:07to be cell and once again we'll change
  388. 11:10the font i don't know why maybe i guess
  389. 11:12i forgot to change the font when i was
  390. 11:13creating the confirmation gui but we can
  391. 11:15change this to gotham bold and now we
  392. 11:17have the cell button and then we also
  393. 11:19want to make the shop button so just
  394. 11:22like that we now have the shot button
  395. 11:23and then we're going to move this down a
  396. 11:25little bit but i'm moving my buns down a
  397. 11:26little bit weirdly i'm not going to lie
  398. 11:28i was kind of like resizing them to move
  399. 11:30it down but what we're going to do is
  400. 11:31we're going to make sure that the size
  401. 11:33is exactly the same so it's pasted like
  402. 11:36that all right so now the sizes are
  403. 11:37perfectly good what we need to do for
  404. 11:39the shot bun is we want to change the
  405. 11:41background color from a green to a
  406. 11:44purple so something like that i think
  407. 11:46that purple's probably good enough the
  408. 11:48text we want to set from cell to shop
  409. 11:50and now that all looks pretty good the
  410. 11:52final thing that we want to do is we
  411. 11:53want to add the infinite food storage
  412. 11:55below this as well so what we can do is
  413. 11:57we can rename the frame from frame to
  414. 11:59notification and then we can go ahead
  415. 12:00and duplicate this and then we want to
  416. 12:03make it a little bit smaller and we're
  417. 12:04basically just going to move it down a
  418. 12:06little bit just like that we want a
  419. 12:07little bit of space still in between and
  420. 12:09we probably want to make this a little
  421. 12:11bit smaller so that's pretty good i
  422. 12:14think we're just going to rename it to
  423. 12:16extra for right now because that keeps
  424. 12:18the name short and that works then we
  425. 12:19can delete the extra button we can leave
  426. 12:21one of the buttons so we'll just go
  427. 12:22ahead and leave the sell button and then
  428. 12:24we'll remove the message now we just
  429. 12:26have the title and the cell button so
  430. 12:27what we want to do is this title we
  431. 12:30actually want to move this directly to
  432. 12:31the bottom so that is pretty decent and
  433. 12:34then the sell button we want to make a
  434. 12:36pretty big and we want to basically just
  435. 12:38move that towards the top and then let's
  436. 12:40make sure that we center it there we go
  437. 12:43and the color of this bun is going to be
  438. 12:45a yellowish kind of orange so something
  439. 12:48like that that works and the text of
  440. 12:50this bun is going to be an infinity
  441. 12:53symbol i'm not sure if they used an
  442. 12:54emoji or if there's like literally a
  443. 12:56text like symbol that you can use for
  444. 12:58that but for right now we're just going
  445. 12:59to use that emoji right there because
  446. 13:01that's the quickest thing that we can do
  447. 13:02and then let's go ahead and change the
  448. 13:04title text to infinite
  449. 13:06food storage and that looks good let's
  450. 13:08go ahead check the mobile device that
  451. 13:10all looks good everything looks perfect
  452. 13:12and i don't see any issues so i think
  453. 13:14we're all good to go now we can go ahead
  454. 13:16and start to script this so from our
  455. 13:17currency gy i'm going gonna copy the
  456. 13:19manager script that we already have and
  457. 13:20paste that directly into our max food
  458. 13:22gui so that we can kind of start from a
  459. 13:24little bit of a template so for this we
  460. 13:26won't need the dna config we'll need the
  461. 13:28replicated storage though and we can
  462. 13:29pretty much delete all of this stuff
  463. 13:31including this variable right here and
  464. 13:34we can delete some of these as well so
  465. 13:35now we just have the currency guy which
  466. 13:37is script.parent and the frame right
  467. 13:39here we'll start renaming these
  468. 13:40variables as well so we're going to say
  469. 13:43maxfoodgy equalscrip.parent and then
  470. 13:46find firstchild we want to get the
  471. 13:47notification frame so we'll rename this
  472. 13:49to notification frame with lowercase n
  473. 13:51and we copy and paste that and we will
  474. 13:53get the extra frame so we will get extra
  475. 13:56just like that now we have both of the
  476. 13:58frames then inside of the notification
  477. 14:01frame we want to get the sell button the
  478. 14:02exit button and the shop button so we
  479. 14:04could say local cell bun equals
  480. 14:07notification frame
  481. 14:09dot instead of find first child i'm just
  482. 14:11gonna use the period because we can
  483. 14:13safely do that here so we're gonna say
  484. 14:14dot cell boom we got the cell bun now
  485. 14:17let's do the exact same thing for the
  486. 14:18shot button so shot button and now once
  487. 14:21again we're going to do the exact same
  488. 14:22thing for the exit button and there we
  489. 14:24go we now got the exit button then the
  490. 14:26final thing that we want to do is inside
  491. 14:27of the extra frame we want to get the
  492. 14:29sell bond but we also want to rename the
  493. 14:31sell bun to
  494. 14:33buy button i guess because remember this
  495. 14:35bun refers to buying the infinite food
  496. 14:37storage so that's why we're going to
  497. 14:38call it buy bun for now so let's get the
  498. 14:41buy bun and we're going to say extra
  499. 14:43frame dot by button there we go we've
  500. 14:46got the buy button and now let's rename
  501. 14:47the variable to buy bun and there we go
  502. 14:49we're all good to go so for the exit
  503. 14:50button we'll script that first we're
  504. 14:52gonna say exit button dot mouse button
  505. 14:54one click connect and what we're gonna
  506. 14:56do is we're simply just going to disable
  507. 14:58the max food gy so we're going to set
  508. 15:00the enable to false so we no longer see
  509. 15:02it and then from the replicated storage
  510. 15:04we actually want to get the remotes
  511. 15:05folder so we're going to say local
  512. 15:06remote equals replicate storage wait for
  513. 15:10child remotes there we go we've now got
  514. 15:12the remotes folder and now inside of the
  515. 15:13remotes we want to get the max food
  516. 15:16remote event and we want to use the dot
  517. 15:18on client event and we're going to
  518. 15:19connect that to a function right here
  519. 15:21and what we're going to do is we're
  520. 15:22simply going to enable the max food gui
  521. 15:25so we're gonna set the enable to true
  522. 15:27instead of false and now that'll make
  523. 15:28the notification pop up on our screen so
  524. 15:30we now have a way to open and close this
  525. 15:32let's go ahead and actually test this in
  526. 15:33our game to make sure that works oh it
  527. 15:35automatically popped up on our screen we
  528. 15:37want to make sure that this actually
  529. 15:39starts with not enabled so there we go
  530. 15:41now it won't be displayed by default and
  531. 15:43then let's go ahead and click and we can
  532. 15:44see max food just popped up when we have
  533. 15:4610 out of 10. when we click sell nothing
  534. 15:48actually happens yet but let's go ahead
  535. 15:49and sell real quick turn that off and
  536. 15:51now we see we did exit that let's go
  537. 15:53ahead and get our food up again and we
  538. 15:54can see that once we hit the max food it
  539. 15:56does pop up on our screen again and
  540. 15:57every single time after that it does
  541. 15:59well so that works perfectly the next
  542. 16:00thing that we want to script is
  543. 16:02teleporting the player to the cell
  544. 16:03location so we're going to say cell bun
  545. 16:05dot mouse bond one click colon connect
  546. 16:07and create another function inside of
  547. 16:09here remember in like the last episode
  548. 16:11when we created the buttons let's go
  549. 16:12inside of the manager and see how we
  550. 16:14actually teleport the player we can see
  551. 16:15right here that we get the player's
  552. 16:16character and then we set the primary c
  553. 16:18frame to the cellpart.c frame so let's
  554. 16:20do the exact same thing that we did here
  555. 16:22and what we can do is we can copy this
  556. 16:24and we can paste that right inside of
  557. 16:26here so there we go we now have the
  558. 16:27workspace and we're getting the cell
  559. 16:28part from the workspace which is this
  560. 16:30part right here and then what we want to
  561. 16:32do is we want to get the character and
  562. 16:34if we get the character we want to
  563. 16:35teleport the player okay so we'll copy
  564. 16:37this if we click this button what we
  565. 16:39want to do we want to try to get the
  566. 16:40player's character and then if we find
  567. 16:42their character then we just want to
  568. 16:43teleport the player to the cellpart.c
  569. 16:45frame and that should work perfectly so
  570. 16:47let's go ahead start this up and see if
  571. 16:48that does so let's try to get the
  572. 16:50notification to pop up again let's click
  573. 16:52cell and we see we get teleported there
  574. 16:53so that works perfectly now we also
  575. 16:55probably want to hide the gui once we
  576. 16:56click that button so what we're going to
  577. 16:58do is we're going to set the enable to
  578. 17:00false and we can do it just like that
  579. 17:01and we pretty much want to do the exact
  580. 17:03same thing for when we click the shot
  581. 17:04button but rather than teleport to the
  582. 17:05player to the cell part we want to
  583. 17:07teleport them to the shop part so we're
  584. 17:08going to say shop button and whenever we
  585. 17:10click that we want to get their
  586. 17:11character and now we need to get the
  587. 17:13shop part so shop part and i'm not sure
  588. 17:16what this is called but shop open and if
  589. 17:19you guys are kind of confused about this
  590. 17:20look inside of your workspace look
  591. 17:21inside of scriptable objects and we see
  592. 17:23we have the cell part which is right
  593. 17:25here so inside of scriptable objects
  594. 17:26it's called cell and then once again
  595. 17:28inside of the scriptable objects we have
  596. 17:29the shop open part so now instead of the
  597. 17:32cell we can just use the shop open c
  598. 17:34frame and that will teleport the player
  599. 17:36to the shop part so let's go ahead and
  600. 17:37test that out so let's get to max food
  601. 17:39get the notification pop up click sell
  602. 17:41get teleported to that part and now
  603. 17:42click shop and we get teleported to the
  604. 17:44shop and the shop appears for us so that
  605. 17:45works exactly as it should perfect the
  606. 17:48final thing that we need to do is we
  607. 17:49need to script the actual buy button
  608. 17:51which remember once again refers to the
  609. 17:53infinite food storage bun the thing is
  610. 17:55though is that creating dev products or
  611. 17:57game passes is definitely going to be
  612. 17:58its own episode because that can be a
  613. 18:01lot that goes into it and this episode
  614. 18:02is already long enough so what we're
  615. 18:04going to do for now is we're going to
  616. 18:05say bye bun dot mouse bun one click call
  617. 18:07and connect function and what i'm going
  618. 18:08to do is i'm going to print add buy game
  619. 18:12pass here so that anytime you click that
  620. 18:14button that i will remember that i do
  621. 18:15need to add that game pass whenever i
  622. 18:17create the specific episode on adding
  623. 18:19all the game passes or developer
  624. 18:20products so ladies and gentlemen with
  625. 18:22that being said we are completely
  626. 18:23finished with this episode hopefully you
  627. 18:25guys enjoy if you guys did or the video
  628. 18:27did help you out make sure you smash the
  629. 18:28like button also subscribe button and
  630. 18:29turn this post notifications on if you
  631. 18:30want to get notified when i upload more
  632. 18:32roblox development content additionally
  633. 18:34i do have patreon if you guys like this
  634. 18:35for me and gain access to all the
  635. 18:36scripts and the game file that i made
  636. 18:38during this episode there's a link down
  637. 18:39below in description and you guys go
  638. 18:40check that out with that being said i
  639. 18:42hope that you guys have a great day and
  640. 18:43i'll see you guys in the next episode

About this transcript

This page contains the full transcript of Setting the Max Food! Roblox Studio Simulator Guide Episode 15 by MonzterDEV, generated from the public captions YouTube serves with the video. The transcript has 4,901 words across 640 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.