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

How can I make a pointlight change colors?

while true do
	wait(2)
script.Parent.PointLight.Color = Color3.new(math.random(200,255),math.random(10,20),math.random(125,155))


end

I started to do this, but I knew I had already messed something up.

I'd really apreciate help, thank you.

1 comment

0

It looks fine to me. Are there any errors in the output?

1 answer

Color3.new takes parameters from 0 to 1, not 0 to 255.

These numbers should be divided by 255 as parameters.

For parameters out of range, this fails silently and just generates a color using some unintuitive method, so there is no output.

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