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)
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);