Hi,
I am having a few problems with this script today is that it wont change the colour of the PointLight when pressed on the GUI. I am running this for my bowling alley which enables and disables in glow mode. But can you help me out?
I have tested this in the Test Server (as shown in the output as Player), but it doesn't work.
Error from Output:
17:40:02.296 - Players.Player.PlayerGui.WorkingOnGui.CeilingLightControl.G:3: bad argument #3 to 'Color' (Color3 expected, got boolean) 17:40:02.298 - Script 'Players.Player.PlayerGui.WorkingOnGui.CeilingLightControl.G', Line 3 17:40:02.301 - Stack End
Script:
function change()
for i = 1, 12 do
workspace:FindFirstChild("LightA"..i).PointLight.Color3.new = not workspace:FindFirstChild("LightA"..i).PointLight.Color3.new
workspace:FindFirstChild("Light"..i).PointLight.Color3.new = not workspace:FindFirstChild("Light"..i).PointLight.Color3.new
if workspace:FindFirstChild("LightA"..i).PointLight.Color3.new(255,255,255) then
if workspace:FindFirstChild("Light"..i).PointLight.Color3.new(255,255,255) then
--Configuring ceiling and lane lights to be switched on
script.Parent.BackgroundColor3 = Color3.new(0,85,0)
workspace:FindFirstChild("LightA"..i).PointLight.Color3.new(255,255,255)
workspace:FindFirstChild("Light"..i).PointLight.Color3.new(255,255,255)
script.Parent.Text = "Glow Mode: Turn On"
else
--Configuring ceiling and lane lights to be switched off
script.Parent.BackgroundColor3 = Color3.new(170,0,0)
workspace:FindFirstChild("LightA"..i).PointLight.Color3.new(0,0,255)
workspace:FindFirstChild("Light"..i).PointLight.Color3.new(0,0,255)
script.Parent.Text = "Glow Mode: Turn Off"
end
end
end
end
script.Parent.MouseButton1Down:connect(change)
Thanks! :)

1 comment
Please look below, I have tried - but doesn't work. Could you try and code it?