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

How do I change the colour and the name of a TextLabel?

Hey Scripters!

So I got this script going on on where I like get overhead gui's. But is there anyway I can change the colours of the TextLabel and the name of the TextLabel, from everything I tried nothing seems to work. This is the script I am currently using:

local gui = game:GetService("ServerStorage"):FindFirstChild("BillboardGui"):Clone()    --Gets the child from the script, which would be the GUI you created

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
    if player.Name == "maup12345"  then --Checks if you're the owner
    gui.Parent = character.Head --Adds the GUI to your head part
elseif player.Name ~= "maup12345" then
    gui.Parent = character.Head --Adds the GUI to your head part
    end
end)
end)

Kind Regards!

2 answers

✓ Accepted answer

Changing the properties of a TextLabel is very easy, for example:

local gui = game:GetService("ServerStorage"):FindFirstChild("BillboardGui"):Clone()
local textlabel = gui.TextLabel

textlabel.Name = "ATextLabel" -- a string
textlabel.TextColor3 = Color3.fromRGB(215, 15, 255) -- a Color3
textlabel.TextScaled = true -- a boolean
textlabel.Size = UDim2.new(1, 0, 1, 0) -- a UDim2

The most important thing to know is what sort of input is expected for that property, that's why I showed these four in particular.

2 comments

0

yes

0

Thanks this seemed to work!

To change the text and colour of a textlabel, you can do this

colour =

TextLabel.BackgroundColor3 = Color3.fromRGB(paste the color3 value u want in here)

text =

TextLabel.Text = (type what u want it to say here)

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