I’ve been trying to make a script which displays text, but I can’t seem to make the text Bold
For clarification: I do Not want RichText, I know there’s FontFace.Bold and FontFace.Weight but they don’t work if I try to do:
Subtitle.FontFace.Bold = true
-- or
Subtitle.FontFace.Weight = Enum.FontWeight.Bold
My current localscript
-- Player
local Player = game:GetService("Players").LocalPlayer
local PlayerUI = Player.PlayerGui
function AddSubtitle(Text)
-- "text" is the text to subtitle
-- Set UI
local UI = Instance.new("ScreenGui"); UI.Parent = PlayerUI
local Frame = Instance.new("Frame"); Frame.Parent = UI
local Subtitle = Instance.new("TextLabel"); Subtitle.Parent = Frame
UI.Name = "Subtitle"
-- Frame
Frame.Size = UDim2.new(0.5, 0, 0.1, 0)
Frame.Position = UDim2.new(0.25, 0, 0.75, 0)
Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
Frame.BackgroundTransparency = 0.5
Frame.BorderSizePixel = 0
Subtitle.FontFace.Weight = Enum.FontWeight.Bold
-- Subtitle
-- Looks
Subtitle.Position = UDim2.new(0, 0, 0, 0)
Subtitle.Size = UDim2.new(1, 0, 1, 0)
Subtitle.Font = Enum.Font.Roboto
Subtitle.TextSize = 1
Subtitle.TextScaled = true
Subtitle.BorderSizePixel = 0
--Colors
Subtitle.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
Subtitle.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
Subtitle.TextColor3 = Color3.fromRGB(255, 255, 255)
-- Transparency
Subtitle.BackgroundTransparency = 0.5
Subtitle.TextStrokeTransparency = 1
-- Set Text
Subtitle.Text = Text
end
AddSubtitle("This is an example test")