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

how to make text on the text button to change color?

hello i want the text on the textbutton to change color but it doesnt works script i use

while true do
	script.Parent.TextColor3 = Color3.new(85, 255, 0)
end

1 comment

0

this is my first time scripting

2 answers

Color3.new takes values in the range from 0-1. What you want is to do Color3.fromRGB. Also, you don't need a while true do loop.

You can try this:

script.Parent.TextColor3 = Color3.fromRGB(85, 255, 0)

10 comments

0

you beat me to it

0

didnt work

0

Are you sure you are using it correctly? It should be a local script in a TextLabel.

0

wait a local script?

0

Yes, LocalScripts should be used in StarterGui. Using Scripts is terribly bad practice as it controls what the client sees on the server, and there is a slight delay.

0

doesnt work

0

You aren't on the client - you are on the server. It says Current: Server.

0

lol im so dumb

0

No you aren't - we all make little mistakes. You won't believe how many times something I made didn't work because I made a very small mistake.

This worked i tested it in studio myself

while true do
	script.Parent.TextColor3 = Color3.fromRGB(85, 255, 0)
end

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