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

My light color changer isn't working. Please help?

This is my script. I don't know why it's not working, but it's frustrating me. I've tried fixing the color script 12 times now and I can't get it. Can someone help me?

NewLight = script.Parent.Pointlight

while true do
NewLight.Color = NewLight.Light.Color(0,255,255)
wait(0.3)
NewLight.Color = NewLight.Light.Color(255,255,255)
wait(0.3)
end

1 answer

Color may need to be Color.new(r, g, b) and it needs to be out of 1 not 255 so try:

NewLight = script.Parent.Pointlight

while true do
	 NewLight.Light.Color = NewLight.Light.Color.new(0, 1, 1)
	wait(0.3)
	 NewLight.Light.Color = NewLight.Light.Color.new(1, 1, 1)
	wait(0.3)
end

Remember to tab your code

Alternatively you could have

 NewLight.Light.Color = NewLight.Light.Color.new(0/255, 255/255, 255/255)

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