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

How do you make changing PointLight make different colors?

Asked by 10 years ago

Example: Red PointLight changes to Orange PointLight in one second. Example 2: It is like a fire light that changes to red to orange and to yellow and it repeats. Example 3: A script that makes the point light changes color.

Answer to me when you know the script for it.

-Carlardar

0
Ok, thanks! Carlardar 5 — 10y

2 answers

Log in to vote
1
Answered by 10 years ago

WELL. LET US BEGIN SHALL WE? This is only if you want the light to change every couple of seconds. No promises of it working completely, I have no access to studio at the moment.

local light = game.Workspace.NAMEOFTHELIGHTHERE
lights = {Color3.new("Bright red"), Color3.new("Bright blue") } --you can add more
time = 1 -- CHANGE THIS TO THE TIME YOU WANT THE LIGHT TO WAIT BEFORE CHANGES

while wait(time) do --Loops continually
    for i,v in pairs (lights) do --Loops through the table
        light.Color = lights[math.random(#lights)] --sets a random light color from the table
    end --ends ze loop
end
Ad
Log in to vote
-2
Answered by 10 years ago
while true do
script.Parent.PointLight.Color = Color3.new(1, 0, 0)
wait(1)
script.Parent.PointLight.Color = Color3.new(1, 85/255, 0)
wait(1)
script.Parent.PointLight.Color = Color3.new(1, 1, 0)
wait(1)
end

Put the Script in the brick with the PointLight in it.

0
thanks @duckhunter392 nkminion 21 — 5y

Answer this question