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

Tried making a color-changing script for a textlabel's backgroundcolor3, didnt work?

Asked by 4 years ago

This code was supposed to change the color of a TextLabel's BackgroundColor3 every 0.1 seconds. Whats the problem?

Script:

while true do 
    script.Parent.BackgroundColor3 = Color3.new(math.random(1, 255), math.random(1, 255), math.random(1, 255))
    wait(0.1)
end

1 answer

Log in to vote
1
Answered by
Mr_Unlucky 1085 Moderation Voter
4 years ago
Edited 4 years ago

Use Color3.fromRGB().

Color3.new() is not RGB.

Color3.fromRGB(255,255,255) --Changes a color to white.-
Ad

Answer this question