Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How can I change the font size in this script?

Asked by 8 years ago

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)

0
i dont think i can answer the first. but i am pretty sure you cant make it smaller bubbaman73 143 — 8y
0
I have seen gui's with a size that is super small Alpha_Toon 57 — 8y
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. BlueTaslem 18071 — 8y
0
If you want a font to be smaller, make the texlabel smaller, and enable textscaled. TheDeadlyPanther 2460 — 8y
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) darkelementallord 686 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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.

Ad

Answer this question