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

How to make this spawned pointlight have a different color?

Asked by 10 years ago

Here is the code:

local heat=Instance.new("PointLight")
    heat.Range=20
    heat.Brightness=10

2 answers

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
10 years ago

The Color3 Scale goes by numbers out of 255.. Must be a fraction.

local heat = Instance.new("PointLight",Parent)
heat.Range = 20
heat.Brightness = 10
heat.Color = Color3.new(255/255,255/255,255/255)

Since 255/255 is equal to 1 whole then it can also be put as this;

heat.Color = Color3.new(1,1,1)

That would make the light white.

The first argument is Red, second Blue, third Green ~ RBG

Hope I Helped

+1

Ad
Log in to vote
-3
Answered by 10 years ago

I presume it'd work by

local heat=Instance.new("PointLight")
    heat.Range=20
    heat.Brightness=10
    heat.Color=[255,255,255]

If that doesn't work, change the square brackets to your normal brackets. If that doesn't work, remove the brackets. If that doesn't work, wait for another response.

Answer this question