YouTube2Text

Rich Text Markup - Roblox GUI Tutorial #11 — Transcript

by BrawlDev · 3,978 words · 507 segments · language en · Watch on YouTube

Full transcript

  1. 0:00oh Newbert I can't think of an intro for
  2. 0:01this video what should I do wait maybe
  3. 0:04you should die wait Newbert why are you
  4. 0:06telling me this I thought we were
  5. 0:08friends oh hold on maybe you should die
  6. 0:12you know what Newbert that actually gave
  7. 0:13me a great idea and no I'm not going to
  8. 0:16follow your request that you just gave
  9. 0:17to me but it's in the way that you said
  10. 0:20that message and how there were certain
  11. 0:22texts in that message that were
  12. 0:25formatted differently than the rest and
  13. 0:27that's actually something really
  14. 0:29interesting to know about when it comes
  15. 0:30to formatting messages inside of your
  16. 0:32game and I think that's what I'm going
  17. 0:34to be talking about inside of this GUI
  18. 0:36tutorial it's going to be what's called
  19. 0:38Rich Text markup but before we Implement
  20. 0:40that inside of Studio let me try and
  21. 0:42give you an understanding of it first
  22. 0:43thanks Newbert I really appreciate it
  23. 0:45all right let's think about this for a
  24. 0:46minute in the previous example I showed
  25. 0:48you with Newbert saying what he just
  26. 0:51said with his message there were certain
  27. 0:53parts of that message that were
  28. 0:54formatted in a different way compared to
  29. 0:57the rest of the string and this is with
  30. 1:00the use of Rich Text markup so in order
  31. 1:03to show you further of what I'm talking
  32. 1:04about I have this text label that just
  33. 1:06simply says this is a message but if I
  34. 1:09were to show you this version of the
  35. 1:11same message we can see here that the
  36. 1:14word message is in bold and it's also
  37. 1:17underlined but the rest of the string is
  38. 1:19not and this is all contained within the
  39. 1:22same string so we don't have um a
  40. 1:25specific format for the entire string
  41. 1:28but only for specific parts of the
  42. 1:30string so this is very useful when we
  43. 1:32want to um use the same string but then
  44. 1:35have certain parts of the string be in a
  45. 1:36different format compared to everything
  46. 1:38else I think from this point onward it's
  47. 1:40pretty self-explanatory but now it's a
  48. 1:41matter of understanding how we exactly
  49. 1:43format these strings and so for the rest
  50. 1:45of this tutorial that's what we're going
  51. 1:47to be doing inside of this video so with
  52. 1:50that being said let's now go straight
  53. 1:51into implementing now that we understand
  54. 1:53it let's Implement Rich Text markup
  55. 1:55inside of Roblox studio so what I'm
  56. 1:57going to do is go to the right side of
  57. 1:59starter G I hit the plus sign and I'm
  58. 2:01going to insert a screen GUI now inside
  59. 2:03of here I'm going to insert a text label
  60. 2:06so let's take this text label let's just
  61. 2:08scale it up just a little bit move it
  62. 2:11towards the center like this I'm going
  63. 2:13to go down and turn text scaled on so
  64. 2:15that we can actually see the text now in
  65. 2:17order for me to help you understand the
  66. 2:20structure of Rich Text markup and how we
  67. 2:22can incorporate this inside of our text
  68. 2:24I'm actually going to insert a local
  69. 2:26script inside of text label so I'm going
  70. 2:28to hit the plus sign insert a local
  71. 2:30script and delete this so what I'm first
  72. 2:32going to do is make reference to the
  73. 2:34text label by saying local text label
  74. 2:37equals script. parent and then what I'm
  75. 2:39going to do is say text label. text
  76. 2:43equals now we can make this text to be
  77. 2:45whatever we want to be it could be the
  78. 2:47previous example that we had which was
  79. 2:49this is a message like this so this is a
  80. 2:54basic message that we have here um and I
  81. 2:56also added it over here as well so this
  82. 2:58is basically what it looks like here
  83. 2:59here um this is how it is formatted but
  84. 3:02if you want to be able to uh to format a
  85. 3:05specific part of the string like let's
  86. 3:07say this word message here then we need
  87. 3:10to use Rich Text markup to add tags to
  88. 3:14surround the part of the string that we
  89. 3:17want to format and it's basically going
  90. 3:19to look something like this where we
  91. 3:20have a an open tag over here on the left
  92. 3:23side and then a Clos tag on the right
  93. 3:25side basically surrounding the the part
  94. 3:28of the string we want to um make a
  95. 3:30change to and so for Rich Text markup
  96. 3:33the way that is formatted it is
  97. 3:35formatted through tags and the way tags
  98. 3:37are formatted is something like this so
  99. 3:40we have a less than character and a and
  100. 3:44a greater than character and then on the
  101. 3:46end of it we have a less than character
  102. 3:49and a greater than character again but
  103. 3:51for the end character we want to add a
  104. 3:53forward slash so that we can
  105. 3:55differentiate between the end tag and
  106. 3:58the open tag so so now we have our tag
  107. 4:01format but we want to know what tag we
  108. 4:04want to use specifically uh for this
  109. 4:07message and like we mentioned before we
  110. 4:09want to make this part in bold so what
  111. 4:12we can do is simply just say lowercase b
  112. 4:15for bold and on the right side we can
  113. 4:18also say B and we need to make sure that
  114. 4:20it is on the right of the forward slash
  115. 4:23and not behind the forward slash and so
  116. 4:25this is basically how we create tags
  117. 4:27using Rich Text markup to format
  118. 4:30specific parts of the string so if we
  119. 4:32were to copy this and go to our game and
  120. 4:36we change the text to this um we can
  121. 4:39still see that we're seeing the tags
  122. 4:42here which is not meant to happen and
  123. 4:43that's because we need to enable this
  124. 4:46property called Rich text so if we
  125. 4:48enable this then we can see that message
  126. 4:52is formatted as the way we want to which
  127. 4:54is in bold but the rest of it is still
  128. 4:57as it is normally and you don't need to
  129. 5:00use a script to be able to format this
  130. 5:02properly you can even just do this
  131. 5:03directly inside of the text property as
  132. 5:05well but I just find it to be harder to
  133. 5:07read so that's why I write this down
  134. 5:08inside of a script first before putting
  135. 5:10it inside of the text property but this
  136. 5:12is how you use Rich Text markup in its
  137. 5:14basic format we can even add multiple
  138. 5:17tags to the same part of the the message
  139. 5:20that we want to format and the way we
  140. 5:23would do this is by simply adding more
  141. 5:25tags surrounding the specific message we
  142. 5:27want to change um so if I were to insert
  143. 5:31another tag we would have another open
  144. 5:33one over here and another closed one
  145. 5:35over here now the thing about this is if
  146. 5:38we added another tag uh to the same
  147. 5:42message then we can either put the open
  148. 5:44tag on the left side or the right side
  149. 5:46but it doesn't really matter where you
  150. 5:47put it for this example I'm going to put
  151. 5:49it on the left side but what is
  152. 5:51important is is to know the order of
  153. 5:54where you put the tags because if let's
  154. 5:56say this tag was to make the message
  155. 5:59bold then we would add a u to this and
  156. 6:01another U over here we need to have the
  157. 6:04tag be on the outside of the entire
  158. 6:06message uh because that's where we had
  159. 6:09the starting tag for uh for the
  160. 6:11underline so basically what I'm trying
  161. 6:13to say is if you have a tag that's
  162. 6:15closer to the message you need to have
  163. 6:17the end tag also be closer to the
  164. 6:19message and you need and you need to
  165. 6:21have the order match up like this so you
  166. 6:24need to do the same thing for the
  167. 6:26underline here as well this is the
  168. 6:28second closest tag to the message so
  169. 6:30that's why the end tag is also the
  170. 6:33second closest uh tag to the message and
  171. 6:36things like that so now that we've come
  172. 6:38to that understanding if we were to
  173. 6:40select this bring it over back here
  174. 6:42change the text to this then as you can
  175. 6:45see now the message is underlined and
  176. 6:48bolded at the same time because we added
  177. 6:50two tags rather than one and you can do
  178. 6:52this for as many tags as you'd like we
  179. 6:54can even add color to specific parts of
  180. 6:57the string so what I'm going to do to
  181. 6:58make this more simp simple is by getting
  182. 7:00rid of these tags that we currently have
  183. 7:03and I need you to understand how the
  184. 7:05structure of this tag is going to work
  185. 7:07so I'm first going to insert the less
  186. 7:09than and greater than symbol less than
  187. 7:11and greater than symbol and then add the
  188. 7:13forward slash to the end of it so the
  189. 7:15way we so the way that this is going to
  190. 7:17work is there's basically a group full
  191. 7:20of tags that we can use and what I'm
  192. 7:23talking about is there's a group called
  193. 7:25font and it has multiple properties that
  194. 7:28we can change change within that same
  195. 7:31group what we're going to do is say font
  196. 7:33spacebar and we're going to change
  197. 7:37specifically the color of it so we're
  198. 7:38going to say color and in order for us
  199. 7:40to actually change the color of it we're
  200. 7:42going to put an equal sign um and
  201. 7:45there's two ways we can change the color
  202. 7:46of a message we can either use an RGB
  203. 7:48value or we can use a hex value but for
  204. 7:51but for the sake of this example we're
  205. 7:53going to use an RGB value so we're
  206. 7:56simply going to say RGB
  207. 7:59open and close parentheses and we're
  208. 8:01going to put in our three RGB values so
  209. 8:04let's say we want to make this part red
  210. 8:05what we're going to do is give 255 for
  211. 8:09red comma zero for green and then comma
  212. 8:12Zer for blue one thing we need to do is
  213. 8:14surround this part with uh double quotes
  214. 8:18so we need to put a double quote here
  215. 8:20and we also need to put a double quote
  216. 8:22by the end of it as well like this but
  217. 8:24now you might think that there's a whole
  218. 8:26bunch of weird stuff happening here and
  219. 8:28there's actually an error that Roblox is
  220. 8:29giving us saying that there's an unknown
  221. 8:31Global variable RGB and that's because
  222. 8:34we can't have double quotes within
  223. 8:36double quotes so what we need to do is
  224. 8:39actually replace these double quotes on
  225. 8:41the outside with single quotes like this
  226. 8:44so that we can have uh double quotes
  227. 8:46within this string so now it should
  228. 8:48basically work as expected um now don't
  229. 8:51forget on the end here we need to
  230. 8:53specify font like this now we're not
  231. 8:56going to be saying font color or
  232. 8:57anything like that because font is the
  233. 8:59group and color is the property that we
  234. 9:02want to change specifically so now if we
  235. 9:04were to copy this string and then paste
  236. 9:07it into this text here then we can see
  237. 9:10that message is now formatted in red but
  238. 9:13the rest is not and so that's basically
  239. 9:16how you add color to your text we can
  240. 9:19also change more things with this font
  241. 9:22because this is a group that has
  242. 9:24multiple different properties um within
  243. 9:26the same tag so what we can try and
  244. 9:28change is the font of this specific part
  245. 9:31of the message right here and we're
  246. 9:33going to use what's called font family
  247. 9:36now often people get confused with font
  248. 9:38family and font face so this
  249. 9:40documentation shows what a font is and
  250. 9:43it explains pretty well the difference
  251. 9:45between font and font color but
  252. 9:47essentially this is a huge list of all
  253. 9:50the font families that you can use
  254. 9:52inside of your Roblox game now to help
  255. 9:54you understand what a font family is
  256. 9:56it's basically a bunch of fonts that
  257. 9:59look I that look similar to each other
  258. 10:02that is basically grouped into one font
  259. 10:05that is shared within the text that we
  260. 10:07use inside of our game and it also
  261. 10:09contains different weights as well so
  262. 10:11weights meaning if it's a normal text if
  263. 10:13it's bolded if it's semi bolded and
  264. 10:16things like that so that's what so
  265. 10:17that's what the weight is but for the
  266. 10:19font family it basically contains
  267. 10:21multiple fonts that are basically the
  268. 10:23same and groups them into one versus a
  269. 10:26font face which is a very specific
  270. 10:29specific font that you'd want to use
  271. 10:31like let's say Ariel bold is a font face
  272. 10:35that's a specific font that we want to
  273. 10:37use but Ariel is the name of the font
  274. 10:39family altogether and usually I would
  275. 10:42recommend just using the font family
  276. 10:44because it's a much more simplified way
  277. 10:45of adding your font inside of your game
  278. 10:48so what I'm going to do is select one of
  279. 10:50these fonts let's say bangers right here
  280. 10:52so what I'm going to do is Select this
  281. 10:55asset ID I'm going to copy it and now
  282. 10:58we're going to go back into Roblox
  283. 11:00studio so that we can add this inside of
  284. 11:01our script all right so I'm back into
  285. 11:03studio and I mentioned that we can have
  286. 11:06uh multiple properties being changed
  287. 11:08within the same tag which is font so all
  288. 11:11we need to do is basically just write a
  289. 11:13space after we make one of these
  290. 11:16property changes and specify the next
  291. 11:18property so what we're going to specify
  292. 11:20now is the family we're going to say
  293. 11:22family equals uh double quotes and
  294. 11:26double quotes again and we're simply
  295. 11:28paste what we copied from the website
  296. 11:30and now what we have is a change to the
  297. 11:33font color and a change to the font
  298. 11:35family by simply separating these two
  299. 11:38using a space and it's important to have
  300. 11:40this all contained within the open tag
  301. 11:43for font and we only specify font one
  302. 11:46time so this is one property change and
  303. 11:48this is another property change right
  304. 11:50here so now let's copy this text uh
  305. 11:53ignoring the single quotes so let's copy
  306. 11:56this go back to the game select our text
  307. 11:58label and let's now paste this new text
  308. 12:01and as you can see it is now red and the
  309. 12:05text uh and the text family has also
  310. 12:08changed to be bangers instead of what we
  311. 12:11had before so this is basically how we
  312. 12:13changed the font color and also the font
  313. 12:15family of this specific part of the text
  314. 12:18right here now there's other things we
  315. 12:19can add to this like adding a text
  316. 12:22stroke uh to be a different color and uh
  317. 12:25have a thickness to it so that we can
  318. 12:26actually see the stroke of a specific
  319. 12:28text so what I'm going to do is go back
  320. 12:31to our script and I'm going to get rid
  321. 12:33of this font tag just so that it's not
  322. 12:35in the way of everything else that we're
  323. 12:37trying to write here um so what I'm
  324. 12:39going to do is add in the open and close
  325. 12:42tag like this and another open and close
  326. 12:44tag like this with a forward slash Right
  327. 12:46Here and Now what I'm going to do is
  328. 12:49specify the stroke tag so we're going to
  329. 12:51say stroke like this and there's two
  330. 12:53things we're going to add in here so
  331. 12:55it's going to be the color and it's Al
  332. 12:56it's also going to be the thickness so
  333. 12:58we're going to say color
  334. 12:59equals don't forget the um the double
  335. 13:02quotes and we're going to specify an RGB
  336. 13:05value so we can make this RGB value
  337. 13:08let's say 0 255 and 0 to be fully green
  338. 13:12and we're also going to change the
  339. 13:14thickness of it so that we can see it
  340. 13:15better so we're going to get out of the
  341. 13:17color property and we're going to uh add
  342. 13:21thickness like this set this equal to
  343. 13:24double quotation double quotation and we
  344. 13:26can put a number inside of here like
  345. 13:28let's say uh four so that we can really
  346. 13:30see it it's very important that when
  347. 13:32we're having values inside of each
  348. 13:34property we use quotations um
  349. 13:37surrounding the value so that um the
  350. 13:40rich text markup language knows that
  351. 13:41this is going to be a value that we're
  352. 13:43trying to change and not like a property
  353. 13:45or anything like that uh oh yeah and
  354. 13:46also at the end here we also can't
  355. 13:48forget about this uh after the forward
  356. 13:50slash we add in the tag name which is
  357. 13:53stroke so now if we take this text once
  358. 13:56again and go inside of AR game right
  359. 13:58here change the text to this so we can
  360. 14:00now see the text stroke that is green
  361. 14:03and it also has a thickness of four so
  362. 14:05we can see it very well so that's how
  363. 14:06you add Strokes inside of your text
  364. 14:09another interesting thing is we can have
  365. 14:11custom line breaks inside of our message
  366. 14:14now what I mean by a line break is if we
  367. 14:16let's say had um a specific part of the
  368. 14:19text that that just says this is and we
  369. 14:21wanted to continue the message but have
  370. 14:24it be down here rather than have it go
  371. 14:26along this way then we would use what's
  372. 14:28called a line break to basically
  373. 14:30separate to basically let us know that
  374. 14:32this is where we want to end and we want
  375. 14:34to now move on to the the next line down
  376. 14:37here um to continue our message the way
  377. 14:40we write that inside of our script is if
  378. 14:42we go back inside of here uh I'm going
  379. 14:44to get rid of the stroke so that um we
  380. 14:46can read this better so I'm going to get
  381. 14:48rid of the stroke like this up until
  382. 14:50this point we've had open and close tags
  383. 14:52but in this case for a line break we
  384. 14:55actually don't need that we just need
  385. 14:57one tag that represents the line break
  386. 14:59and what we're going to do is just
  387. 15:00simply say uh open and close tag like
  388. 15:03this and we're going to put in a br so
  389. 15:06this indicates break for line break and
  390. 15:09we're also going to say space forward
  391. 15:11slash so this is the tag for a line
  392. 15:15break right here and the reason it's
  393. 15:17formatted like this is because we only
  394. 15:19need one tag for this which is the line
  395. 15:21break tag and we need to be able to end
  396. 15:23it by using the forward slash and so if
  397. 15:25we were to copy this message and put it
  398. 15:28inside our text label then we can see
  399. 15:31that it went from this is and then it
  400. 15:34just it just cut itself out right there
  401. 15:35to continue onward down here with a
  402. 15:38message now I want you to be careful
  403. 15:39with the spacing because if we had
  404. 15:42spacing over here then it's going to
  405. 15:44start with a space and then a message so
  406. 15:47what I would actually do is not uh space
  407. 15:50this out and I would just simply copy it
  408. 15:52like this and then have it be like this
  409. 15:55you can see it's now structured a lot
  410. 15:57better because we got rid of the space
  411. 15:59that was surrounding the the blind bre
  412. 16:02tag now we have Escape forms now
  413. 16:05basically what these are is these are
  414. 16:07specific characters we can add inside of
  415. 16:09our message that won't interfere with
  416. 16:12the formatting of the the message itself
  417. 16:15so what I mean is if we go back to our
  418. 16:17script and we want it to have a less
  419. 16:19than symbol but we don't want it to be
  420. 16:21confused with the actual formatting then
  421. 16:24we would use what's called Escape forms
  422. 16:26to represent the less than symbol or or
  423. 16:30the the greater than symbol for for
  424. 16:31instance where it won't be confused with
  425. 16:34the formatting of it so I'm going to
  426. 16:36show you a few examples of them but not
  427. 16:38go through all of them but just but just
  428. 16:40a few examples so inside of here I'm
  429. 16:42going to expand this message and um
  430. 16:45every single Escape form starts with an
  431. 16:48and peran symbol and it ends with a
  432. 16:51semicolon so for every single Escape
  433. 16:53form we have it starts with the ersan
  434. 16:56and it ends with a semicolon and then we
  435. 16:58put in whatever the tag is inside of
  436. 17:01these two characters right here and so
  437. 17:03for a less than character all we need to
  438. 17:06do is say LT because LT stands for less
  439. 17:10than and we can do the same thing for a
  440. 17:12greater than symbol as well by
  441. 17:14specifying the andand semicolon and then
  442. 17:18we say GT for greater than and so if we
  443. 17:22were to select this and bring this
  444. 17:25inside of our text label in here and we
  445. 17:27change the text to this then we can see
  446. 17:29that it is now rendered as the less than
  447. 17:32and greater than character rather than
  448. 17:34whatever we had here with the Escape
  449. 17:37form format and this is very useful if
  450. 17:39we don't want the message to overlap
  451. 17:41with characters that we actually want to
  452. 17:42show but is being interfered with the
  453. 17:45formatting uh so this this can also be
  454. 17:47for things like quotes and apostrophe
  455. 17:49symbols as well so if we were to write
  456. 17:52the n% semicolon and then inside of here
  457. 17:54we say quote like this and let's say we
  458. 17:56also want to have an apostrophe then we
  459. 17:58would do the the same thing with Anand
  460. 18:01uh semicolon and then apos apos is short
  461. 18:04for apostrophe and then quot T is short
  462. 18:07for quotation if we were to select this
  463. 18:09again go back to our game and then
  464. 18:11change this text we can now see that um
  465. 18:14we have the double quotes here which is
  466. 18:16quotation and then we have the
  467. 18:17apostrophe which is also known as a
  468. 18:19single quote as well so this is the use
  469. 18:21of Escape forms and I hope you find this
  470. 18:23to be useful inside of your text that
  471. 18:25you decide to change so for today's
  472. 18:27challenge I want you to recreate this
  473. 18:29panel on the right side of the screen um
  474. 18:32with a text label and three buttons here
  475. 18:34but you don't really have to make the
  476. 18:35buttons functional and to be honest you
  477. 18:36don't really have to make them buttons
  478. 18:38at all but what I want you to practice
  479. 18:40is using Rich Text markup to format
  480. 18:43these strings to be the way that they
  481. 18:45are now you don't have to match it
  482. 18:46perfectly because there are some things
  483. 18:48here that you may or may not know about
  484. 18:50like this strikethrough uh text or you
  485. 18:53might not know which font I'm using for
  486. 18:55some of these texts but I definitely
  487. 18:57want you to get into the habit
  488. 18:59of using Rich Text markup to make these
  489. 19:01specific changes like game mode is
  490. 19:04bolded underlined and it's in a
  491. 19:06different font um these three options
  492. 19:08here is bolded and they're in a
  493. 19:10different font these uh texts here are
  494. 19:12in a different color and have a stroke
  495. 19:14and then these ones they're in a
  496. 19:16different font and have different colors
  497. 19:18and things like that so I want you to be
  498. 19:20able to replicate this to the best of
  499. 19:21your ability and that's going to be your
  500. 19:23challenge for today if you want to learn
  501. 19:25more about learning how to make a text
  502. 19:28label then I will have a link to that
  503. 19:29for you right here to watch inside of
  504. 19:31this video and with that being said
  505. 19:33that's going to be it for today's video
  506. 19:35I hope you enjoyed it and I will see you
  507. 19:37in the next one take care

About this transcript

This page contains the full transcript of Rich Text Markup - Roblox GUI Tutorial #11 by BrawlDev, generated from the public captions YouTube serves with the video. The transcript has 3,978 words across 507 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.