I am trying to make a generator that allows you to disable and enable, but when I use my script it either does it to one light or messes up the material/color things. I don't want to union them because the light only shows in the middle of it. if anyone can help, please do it!

Btw, I am bad at scripting, please go easy on me!

Script:

function onClicked(plyr)
	v = script.Parent.Value
	if v.Value == false then
		v.Value = true
 game:GetService("Workspace").Light.Material = Enum.Material.Neon		
		_G.Light.BrickColor = BrickColor.new("Fossil")
		script.Parent.BrickColor = BrickColor.new("Bright red")
		_G.Light.SpotLight.Enabled = true
	elseif v.Value == true then
		v.Value = false
 game:GetService("Workspace").Light.Material = Enum.Material.Glass
		_G.Light.BrickColor = BrickColor.new("Really black")
		script.Parent.BrickColor = BrickColor.new("Bright red")
		_G.Light.SpotLight.Enabled = false
	end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

Thank you if you are able to help me!