I’m trying to apply a font to a newly created TextLabel. Here’s the line of code which used from a previous devforum post, however it does not appear to be working for me. Here’s the line of code in question:
TextLabel.FontFace = Font.fromName("Fredoka One",Enum.FontWeight.Medium,Enum.FontStyle.Normal)
What can I do to make it so that the font is applied to the newly created textbox.
For more information, here's the block of code including the textlabel of which the font I am trying to change
elseif receiptInfo.ProductId == 1658851386 then
for _, p in pairs(players:GetPlayers()) do
if p ~= player then
if p.Character.HumanoidRootPart then
local explosion = Instance.new("Explosion")
explosion.Position = CFrame.new(p.HumanoidRootPart.Position)
end
end
local TextLabel = Instance.new("TextLabel")
TextLabel.Parent = p.PlayerGui.Default
TextLabel.Text = player.Name .. " has nuked the server!"
TextLabel.FontFace = Font.fromName("Fredoka One",Enum.FontWeight.Medium,Enum.FontStyle.Normal)
TextLabel.TextScaled = true
TextLabel.Size = UDim2.new(0.25, 0, 0.25, 0)
TextLabel.Position = UDim2.new(0.375, 0, 0.386, 0)
TextLabel.TextColor3 = Color3.new(158, 0, 0)
TextLabel.Visible = true
wait(5)
TextLabel.Visible = false
end