Script not working as it should

wait(5)
script.Parent.SurfaceGui.TextLabel.BackgroundColor3 = Color3.new(99,95,98)
script.Parent.Color = Color3.new(99,95,98)
wait(60)
script.Parent.SurfaceGui.TextLabel.BackgroundColor3 = Color3.new(255,255,255)
script.Parent.Color = Color3.new(255,255,255)

Basically, this just changes the colour of a part and background of a text gui on that part, however for some reason this doesn’t work. It changes to grey after 65 seconds, when it should change to grey after 5 seconds, and change to white after 65. Anyone have ANY idea why this isn’t working?

Color3.new takes the range of 0-1, 1, 1, 1 being rgb(255, 255, 255).

Use Color3.fromRGB or divide all the value by 255 instead.

2 Likes

Thanks for the help! I forgot that Color3 needed .fromrgb, thanks for the reminder!