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

My text keeps on turning white?

	EnterUsername = Instance.new("TextBox")
	EnterUsername.Parent = LoginFrame
	EnterUsername.Name = "EnterUsername"
	EnterUsername.Size = UDim2.new(.9,0,.13,0)
	EnterUsername.Position = UDim2.new(0.05,0,.056,0)
	EnterUsername.Text = "Username"
	EnterUsername.BackgroundTransparency = 1
	EnterUsername.FontSize = "Size24"
	EnterUsername.TextWrapped = true
	EnterUsername.TextXAlignment = "Left"
	EnterUsername.Font = "SourceSans"
	EnterUsername.TextColor3 = Color3.new(171,171,171)

It never works it keeps setting the number to a really high one like 43605, 43605, 43605 (which is just white)

1 answer

✓ Accepted answer

Color3.new takes a number between 0 and 1.

If you want to use a number between 0 and 255 you have to divide that number by 255 in order to again receive a number between 0 and 1.

EnterUsername.TextColor3 = Color3.new(171/255, 171/255, 171/255)

Alternatively, you can use Color3.fromRGB to give numbers between 0 and 255.

EnterUsername.TextColor3 = Color3.fromRGB(171, 171, 171)

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