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

How do you make a GUI which changes colour?

Hi,

I've been trying to make a GUI which can change colours. It doesn't seem to work, despite changing the repeat loop to a while true loop. This is what I have got so far:

box = script.Parent
while true do
	 for i = 1,0,1/255 do
	  box.TextColor3 = Color3.new(i,i,i)
	  wait()
	 end
 wait ()
end

1 comment

0

You're going from 1 to 0, you want to make the third parameter in your for loop a negative number or else it will never achieve 0.

1 answer

✓ Accepted answer

A decreasing numerical for loop requires a negative interval. The 1/255 interval should be -1/255 instead (rather -1/256).

1 comment

0

Thanks! <3

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