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

How do you make changing PointLight make different colors?

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

1 comment

0

Ok, thanks!

2 answers

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
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.

1 comment

0

thanks @duckhunter392

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