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

Why my script (which should be simple ... I guess ...) about changing color does not work?

Here my script

while true do
	script.Parent.BrickColor = BrickColor.new(0, 255, 0)	
	wait(2)
	script.Parent.BrickColor = BrickColor.new(255, 0, 0)
end

1 answer

###The problem is very simple. After the second change on line 4, you didn't add another wait call after it, so it instantly went to line 2 and made it seem like it didn't change. The fix is to add a call to the wait function after line 4.

while true do
    script.Parent.BrickColor = BrickColor.new(0, 255, 0)    
    wait(2)
    script.Parent.BrickColor = BrickColor.new(255, 0, 0)
    wait(2)
end


3 comments

0

Oh.... Yeah, i forgot it ;_;

0

By the way, say you're trying to make something red. Don't you do something like BrickColor.new("Really red") instead of an RGB value?

0

That's perfectly fine.

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