What am I missing from this script?

I created this script to make a light change colour, but it won’t work. This is the script:
while true do
script.parent.Color = 250, 0, 4
wait (2)
script.Parent.Color = 50, 0, 250
wait (3)
script.Parent.Color = 12, 250, 0
wait (2)
script.Parent.Color = 209, 0, 250
wait (3)
end

I’m not good at scripting, and needed reference to script this, so I’m not surprised it doesn’t work. Could anyone find what’s missing?

The color needs to be Color3 which you obtain by Color3.fromRGB(r, g, b)

while true do
script.parent.Color = Color3.fromRGB(250, 0, 4)
wait (2)
script.Parent.Color = Color3.fromRGB(50, 0, 250)
wait (3)
script.Parent.Color = Color3.fromRGB(12, 250, 0)
wait (2)
script.Parent.Color = Color3.fromRGB(209, 0, 250)
wait (3)
end
1 Like

Ok, I will try that, thanks for the help!

2 Likes