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

New color help?

Any help? I'm trying to make it so it will change colors on clicked, I only know Color3 not Color. What do I do?

x = script.Parent.Parent.Parent.Parent.Parent.Parent.Lights
script.Parent.MouseButton1Down:connect(function()
	x.Rainbow.SpotLight.Color(255, 0, 0)
	x.Rainbow1.SpotLight.Color(0, 38, 255)
	x.Rainbow2.SpotLight.Color(255, 255, 255)
	x.Rainbow3.PointLight.Color(0, 5, 77)
end)

1 answer

Color is a property, not a function... You set it by using = (assignment).

It takes a Color3 value, whose constructor is Color3.new and whose arguments are from 0 to 1 instead of 0 to 255. It would look like this:

someLight.Color = Color3.new(0,0.4,0.9);

3 comments

0

So something like this?

0

x.Rainbow2.SpotLight.Color = Color3.new(255/255, 255/255, 255/255);

0

Yes, that's what I said

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