Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I change the font size in this script?

I have created a simple script that shows group ranks over our head, but what I'm having trouble with is setting the font size. I'm using the function Enum.FontSize.Size, but it won't change the size of my billboard gui. I would also like to know how I could change it to something smaller than 8.

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function() -- So a new character is in use.
    local rank = plr:GetRankInGroup(2696373)
    local role = plr:GetRoleInGroup(2696373)
	local size = Enum.FontSize.Size8
	
    if rank ~= 0 then
        local rankd = game.ServerStorage.Rank:Clone()
        repeat wait() until plr.Character
        rankd.Parent = plr.Character.Head
        rankd.TextLabel.Text = role
        rankd.TextLabel.TextColor3 = Color
		rankd.TextLabel.FontSize = size
    end
end)
end)

5 comments

0

i dont think i can answer the first. but i am pretty sure you cant make it smaller

0

I have seen gui's with a size that is super small

0

8 corresponds to a different actual size depending on the font. You could select a different font that's smaller, perhaps. Or you could use custom fonts that are rendered using images.

0

If you want a font to be smaller, make the texlabel smaller, and enable textscaled.

0

I'd recommend either using imagelabels, or alternatively changing the TextScaled property to true, and the size will get smaller as you get further away from the gui (so long as the gui has been scaled using Offset instead of Scale)

1 answer

rankd.TextLabel.FontSize = "Size14"

You can change it to Size18 also. If you insert a textbox, you can see the available sizes in the properties bar.

This discussion is preserved as it was. New answers, comments, and votes are closed.