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

I'm trying to make it so that when a button is clicked, a part changes color every 2 seconds. Help?

I have already tried this.

if workspace.Button.Sound.IsPaused == false then
	while true do
		script.Parent.Color = Color3.new(math.random(), math.random(), math.random())
		wait(2)
	end
end

Is there any way to fix this?

3 answers

I think you need to use BrickColor.new instead of Color3.

Edit: If you need any help DM me NANIII#2487 in Discord. Make sure you are in the website's discord server first.

Does it work if you try

Color3.fromRGB(math.random(), math.random(), math.random())

?

script.Parent.Color = Color3.fromRGB.New(math.random(1,255), math.random(1,255), math.random(1,255))

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