Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago
Edited 3 years ago

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

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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.

Ad
Log in to vote
0
Answered by 3 years ago

Does it work if you try

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

?

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago
script.Parent.Color = Color3.fromRGB.New(math.random(1,255), math.random(1,255), math.random(1,255))

Answer this question