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

How can I make a pointlight change colors?

Asked by 10 years ago
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.

0
It looks fine to me. Are there any errors in the output? MrFlimsy 345 — 10y

1 answer

Log in to vote
0
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

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.

Ad

Answer this question