YouTube2Text

TextLabel - Roblox GUI Tutorial #2 — Transcript

by BrawlDev · 2,862 words · 382 segments · language en · Watch on YouTube

Full transcript

  1. 0:00hey thanks for stopping by in this
  2. 0:02episode of my GUI tutorial on Roblox
  3. 0:04we're going to be going over text labels
  4. 0:06so in my last episode I made a broad
  5. 0:08introduction to guis and how they work
  6. 0:10on Roblox and also a little bit about
  7. 0:12creating screen guis as our container
  8. 0:14for our GUI objects that we're going to
  9. 0:16be implementing inside of our games and
  10. 0:19with those screen GUI containers I also
  11. 0:21added a text label to show text inside
  12. 0:24of our game for each of the players on
  13. 0:27their screen but in this episode we'll
  14. 0:29go a little bit deep into text labels
  15. 0:31and more about the properties that these
  16. 0:34text labels and really any of these GUI
  17. 0:36elements contain and we'll also throw in
  18. 0:38a little bit of scripting so that we can
  19. 0:40see how we can change these properties
  20. 0:42just like we do with any other instance
  21. 0:44inside of the game so how do we create
  22. 0:45these GUI elements well if you remember
  23. 0:47from my last episode we we create them
  24. 0:49inside of the folder called starter GUI
  25. 0:51that's inside of our Explorer we hit the
  26. 0:53plus sign and then we first create the
  27. 0:55container for all of these GUI elements
  28. 0:59called a screen GUI so we'll insert that
  29. 1:01and let's call this uh main GUI and then
  30. 1:06let's hit the plus sign here and let's
  31. 1:08just search for a text label so a text
  32. 1:11label looks like this and On Studio we
  33. 1:14should be able to see it on our screen
  34. 1:15we can click it we can drag it around
  35. 1:18and we can even change the size of it
  36. 1:19just like how we wanted to uh we can
  37. 1:22align it to the center or pretty much
  38. 1:24just anywhere it looks pretty boring and
  39. 1:26basic but we're about to change that by
  40. 1:28modifying a bunch of of the properties
  41. 1:31that this text label has and mostly for
  42. 1:34what a lot of these GUI elements will
  43. 1:36have so first things first we have the
  44. 1:38background color of this text label
  45. 1:40which is by default white and in order
  46. 1:42to change it we go to the right here and
  47. 1:45we click on this property called
  48. 1:47background color 3 so what we do is we
  49. 1:49click this little box with uh the color
  50. 1:52that it's associated with and Roblox
  51. 1:54will bring up a panel that lets us
  52. 1:57select a color for our background color
  53. 2:00so this basically takes in three numbers
  54. 2:02the red green and blue value and uses
  55. 2:04those values to represent a color and
  56. 2:07this is important to know when we uh
  57. 2:09start changing these colors through
  58. 2:11scripting rather than uh using this
  59. 2:13panel that Roblox has given to us so
  60. 2:15let's change this color to Orange let's
  61. 2:18say let's hit okay and as you can see
  62. 2:21the background color of this text label
  63. 2:23is now orange and the the numbers have
  64. 2:26also changed to fit that color as well
  65. 2:29so now if we want to change the
  66. 2:31transparency of this of this Frame so we
  67. 2:35don't want it to be fully opaque because
  68. 2:36opaque is the opposite of transparent
  69. 2:38transparent basically just means that
  70. 2:40we'll make it completely invisible and
  71. 2:42opaque means that we will show it fully
  72. 2:44so right now this background is being
  73. 2:46shown fully but if we want to change
  74. 2:48that uh we go to this background
  75. 2:50transparency property and this is
  76. 2:52basically a slider that gives a number
  77. 2:54between zero and one and the further
  78. 2:58along we go towards one the more
  79. 3:00invisible the background becomes so if
  80. 3:03it becomes one then the background
  81. 3:05becomes fully invisible if it's zero
  82. 3:07then it's fully opaque but you notice
  83. 3:10the text is still showing uh even though
  84. 3:13the frame is becoming invisible uh
  85. 3:15that's because this is specifically for
  86. 3:17the background transparency and the way
  87. 3:19we can do that is changing the
  88. 3:20transparency of the text but we will go
  89. 3:23through that in a little bit next thing
  90. 3:24we can do is add a border to the frame
  91. 3:28and we can do that with this property
  92. 3:30called border size pixel so this is a
  93. 3:33number from 0 to I believe 100 so zero
  94. 3:38means that there is no border but the
  95. 3:39bigger number we give it uh the bigger
  96. 3:42the Border will be so if we give it a
  97. 3:44value of five then we can see that
  98. 3:47Roblox has added in a black border
  99. 3:49inside of this text label um and I think
  100. 3:53the maximum is 100 which looks like this
  101. 3:56it looks really silly but but Roblox
  102. 3:58will allow you to do this just like
  103. 3:59letting you know that because if I set
  104. 4:00this to 101 it just goes back to 100 but
  105. 4:03let's just go back to five we can even
  106. 4:06change the color of this border by
  107. 4:08selecting border color three clicking on
  108. 4:11the circular color again and we can pick
  109. 4:14a different color so we can pick let's
  110. 4:17say toothpaste hit okay and now we can
  111. 4:20see that the color of the Border has
  112. 4:21changed so moving along let's scroll
  113. 4:24down a little bit um we're not going to
  114. 4:25go over the positions or rotations or
  115. 4:27sizes because I have more to say about
  116. 4:30these uh we will go over this in a
  117. 4:31future episode when I talk about uh any
  118. 4:33of the future GUI elements but I'm only
  119. 4:35going to go over some of the properties
  120. 4:37for right now so another property is
  121. 4:40visible um this basically sets whether
  122. 4:43you want this text label to show on the
  123. 4:46player screen or not so if I click it
  124. 4:48then it'll just completely disappear if
  125. 4:50I click it again then it will show up so
  126. 4:52that's pretty self-explanatory and now
  127. 4:54the next property is zindex so this
  128. 4:56basically acts the same way as if we go
  129. 4:59to screen GUI this acts as the same
  130. 5:02property as display order in which if we
  131. 5:04go back to our text label zindex
  132. 5:07essentially tells us which text label
  133. 5:09should be displayed first in front of
  134. 5:12the other text labels that belong to the
  135. 5:15same parent so if I let's say had
  136. 5:17another text label here both of them are
  137. 5:19parented to main GUI the text label with
  138. 5:22the bigger Z index will show up in front
  139. 5:25of the other text labels so let's just
  140. 5:28rightclick on text label and let's
  141. 5:30duplicate it and we'll also rename these
  142. 5:32text labels to show some differentiation
  143. 5:34so this first one we will call this text
  144. 5:36label one and then we will call this one
  145. 5:38text Label 2 and now for text Label 2
  146. 5:41let's just uh drag this down a little
  147. 5:43bit to the right as well and let's also
  148. 5:46change the background color of this to
  149. 5:49let's say green and so to demonstrate
  150. 5:53this property right now text Label 2 is
  151. 5:55in front of the first text label but if
  152. 5:58we select the first text label and we
  153. 6:00change the Z index to a greater number
  154. 6:03so let's say two for instance then the
  155. 6:06first text label will actually appear in
  156. 6:08front of the second one so by default
  157. 6:10the zindex is one but you can increase
  158. 6:12this number to have a higher priority on
  159. 6:16which ones will show in front of the
  160. 6:18other ones so that's something
  161. 6:20interesting to know about and the last
  162. 6:22category we'll talk about down here is
  163. 6:24the text category so you can see this
  164. 6:26label here it's kind of hard to read and
  165. 6:28it's pretty small uh there's a lot of
  166. 6:31things we can do in order to change that
  167. 6:33so first things first is the font uh
  168. 6:36which is just called font face uh if we
  169. 6:38click this there's a drop down of all of
  170. 6:40these different fonts that we can choose
  171. 6:42from so let's pick let's say permanent
  172. 6:45marker uh we can even change the style
  173. 6:47of it by making it uh bold or even
  174. 6:50italics as well and we can even change
  175. 6:53the text itself so it doesn't have to
  176. 6:56say label it can say something else that
  177. 6:58we wanted to say uh we can do that with
  178. 7:00this text property so on the right side
  179. 7:02it takes in a string so if we select it
  180. 7:05and delete this we can say something
  181. 7:07different um how about we say Roblox
  182. 7:11instead uh you can still see it but it
  183. 7:13is a little hard to read so in order to
  184. 7:16make it bigger we can change the text
  185. 7:18size so we do that by going over here
  186. 7:21down to text size and it's right now
  187. 7:25text size 14 but we can click on this
  188. 7:27and we can change the slide to make it a
  189. 7:30bigger number like let's say 52 or maybe
  190. 7:33even something even bigger like 75 now
  191. 7:35we can see the text a lot easier we can
  192. 7:38even change the color of the text so
  193. 7:40that it's not Black by setting text
  194. 7:42color 3 to something else like we can
  195. 7:46make this white instead and then we can
  196. 7:47hit okay and now we see that if we also
  197. 7:50want to add an outline to the text
  198. 7:53because it is a little hard to read then
  199. 7:55what we can do is we can add in a text
  200. 7:58stroke and the way we do that is by
  201. 8:01going on the right side there's going to
  202. 8:02be a property called text stroke
  203. 8:05transparency remember what I said about
  204. 8:07transparency properties is that it's
  205. 8:09either a value between 0o and one uh one
  206. 8:12being transparent and zero being opaque
  207. 8:14so by default the text stroke is one
  208. 8:17what we can do is we can click this and
  209. 8:19we can slide this down to zero so that
  210. 8:22we can see that there's a little outline
  211. 8:24on there and we can even change the text
  212. 8:26stroke color if we really wanted to by
  213. 8:28going to text Str color 3 and changing
  214. 8:31it to some random color like green so
  215. 8:35these are just some properties of the
  216. 8:37text label and gradually over time the
  217. 8:39further we go on through this tutorial
  218. 8:42guide we're going to be exposed to all
  219. 8:44the properties here the more we work
  220. 8:47with GUI element inside of this guide
  221. 8:49but for right now these are just some of
  222. 8:51the properties we can work with all
  223. 8:53right but now let's put this into
  224. 8:54practice there's a very common use case
  225. 8:56for text labels and that is currency
  226. 8:59so when you're playing a Roblox game
  227. 9:01there's usually going to be a label that
  228. 9:03shows your coins or any other currency
  229. 9:06that you have in the game and it'll show
  230. 9:07a text with a number on it that changes
  231. 9:10with your actual currency and so if
  232. 9:12you're very new to this then you can
  233. 9:14pretty much follow what I do in this
  234. 9:16episode Because by the end of it I want
  235. 9:17you to take away that these things
  236. 9:19actually have a practical use and I
  237. 9:21think it'll be very cool to show what
  238. 9:23these things can do very early on so
  239. 9:25that's what we're going to do I'm going
  240. 9:27to first delete text Lael 2 cuz we don't
  241. 9:29need this anymore and we'll also make
  242. 9:31modifications to text label one so first
  243. 9:34thing we're going to do is rename this
  244. 9:36so we're going to right click and rename
  245. 9:38we're going to call this currency label
  246. 9:42and down here let's change the font to
  247. 9:45something a little nicer let's make this
  248. 9:48highway Gothic so that the currency will
  249. 9:50be a little more readable and now what
  250. 9:52we'll do we're first going to create a
  251. 9:53leaderboard script and we're going to do
  252. 9:55that by creating a script inside of
  253. 9:57server script service so we will hit the
  254. 9:58plus sign
  255. 10:00script delete this and first we're going
  256. 10:03to make a player added event so we'll
  257. 10:05say game. players. player added colon
  258. 10:10connect function and then in parentheses
  259. 10:13we will put the player as an argument so
  260. 10:16we're first going to create the leader
  261. 10:17stats folder by saying local leader
  262. 10:19stats equals instance. new in quotations
  263. 10:25we will say int value we will set the
  264. 10:28parent of the leader stats to the player
  265. 10:31and then we will rename the leader stats
  266. 10:33folder to Simply leader stats in all
  267. 10:37lowercase and then oh sorry I made a
  268. 10:40typo uh instance. new folder not in
  269. 10:43value because we're going to make that
  270. 10:44down here with coins so we're going to
  271. 10:46say local coins equals instance. new int
  272. 10:52value and we will set the coins parent
  273. 10:55to leader stats and then we will set the
  274. 10:59name of coins to Simply coins so that's
  275. 11:03our basic leader stat script so we're
  276. 11:05done with that now we're we're going to
  277. 11:07do is insert a local script so if we go
  278. 11:10back into the game Let's insert a local
  279. 11:12script inside of our main gy it's very
  280. 11:15important that it is a local script that
  281. 11:16we're using so hit the plus sign local
  282. 11:18script the first thing we will do is
  283. 11:21make reference to to our local player
  284. 11:24and what's great about using a local
  285. 11:25script is that we can access our player
  286. 11:29with just one line because a local
  287. 11:31script is designed to be accessed for
  288. 11:33every single player which is why I find
  289. 11:36this to be very convenient so we will
  290. 11:38access this player by saying local
  291. 11:41player equals
  292. 11:44game.
  293. 11:46players. local player and it's very
  294. 11:50important to know that this property can
  295. 11:51only be used if this is inside of a
  296. 11:54local script this cannot be done inside
  297. 11:57of a normal script because the script
  298. 11:59doesn't know exactly what player you're
  299. 12:00talking about but a local script can
  300. 12:03tell you exactly what player you're
  301. 12:04talking about because these local
  302. 12:06scripts are run on the client side so
  303. 12:08essentially this is taking the current
  304. 12:11player that's executing the script
  305. 12:13inside of the players so it's going to
  306. 12:15take our player instance and as you know
  307. 12:17from our player we created a leader stat
  308. 12:20folder and inside of that leader stat
  309. 12:22folder we created a coins int value so
  310. 12:25so using this chain we're going to
  311. 12:28access access the coins int value so in
  312. 12:31our local script we're going to drop a
  313. 12:33line and we're going to first access the
  314. 12:35leader stats by saying local leader
  315. 12:38stats equals player colon wait for Child
  316. 12:42open parentheses close parentheses in
  317. 12:44quotations leader
  318. 12:46stats and then down here we're going to
  319. 12:49access the coins by saying local coins
  320. 12:51equals leader stats wait for child coins
  321. 12:57so now we've accessed the coin coins int
  322. 12:59value and now we want to make an event
  323. 13:02that basically triggers whenever the
  324. 13:04coins in value changes we will then
  325. 13:07change the text of this text label right
  326. 13:10here so we're first going to make
  327. 13:13reference to our currency label by
  328. 13:15saying local currency label equals
  329. 13:19script. parent. currency label and then
  330. 13:23we're going to make the event that
  331. 13:24triggers whenever the coin's int value
  332. 13:27gets changed and this is done by saying
  333. 13:31coins.
  334. 13:32changed colon connect
  335. 13:36function open parentheses closed
  336. 13:37parenthesis and then down here what
  337. 13:39we're going to do is we're going to
  338. 13:42change the text of the currency label so
  339. 13:45this text right here so we're going to
  340. 13:47say currency
  341. 13:49label. text equals and this new text is
  342. 13:53going to be the new value of coins and
  343. 13:57we fetch this value by saying saying
  344. 13:59coins. value and so this is pretty much
  345. 14:01our script right here if we go into the
  346. 14:03game we can actually see this change for
  347. 14:05ourselves so if we go into the game hit
  348. 14:06test and hit play what we'll do is that
  349. 14:09we're going to go to the server side by
  350. 14:11clicking on current client instead
  351. 14:13current server we're going to open up
  352. 14:15players open up our player and go to
  353. 14:17leader stats and coins let's change this
  354. 14:20property to 100 let's go back into the
  355. 14:24game and as you can see the text label
  356. 14:27has changed its text whenever the coins
  357. 14:29value changed on the server and before
  358. 14:32this just said Roblox but now it updated
  359. 14:35the text to whatever this was so if we
  360. 14:37go back into the server and change this
  361. 14:39to 10,000 or 100,000 I don't exactly
  362. 14:43know what it is it's 100,000 it updated
  363. 14:45it just like that so this is one
  364. 14:48instance of using text labels I think
  365. 14:50this will definitely come in handy
  366. 14:52whenever you have values that need to be
  367. 14:53updated during the game's runtime so
  368. 14:56that's pretty much going to be it for
  369. 14:57this episode on Tex labels there were a
  370. 14:59bunch of properties that I missed but
  371. 15:01that's because most of these GUI
  372. 15:03elements share the same properties so
  373. 15:05like I mentioned gradually over time
  374. 15:07we're going to be exposed to all these
  375. 15:09different properties and you'll be more
  376. 15:11competent with actually using these
  377. 15:13properties and understanding how all of
  378. 15:15them work so that's pretty much going to
  379. 15:17be it for this episode join my Discord
  380. 15:18the link is in the description and I
  381. 15:20will see you in the next episode take
  382. 15:22care

About this transcript

This page contains the full transcript of TextLabel - Roblox GUI Tutorial #2 by BrawlDev, generated from the public captions YouTube serves with the video. The transcript has 2,862 words across 382 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.