First, make sure that every instance in workspace.Lighting contains a PointLight. If your script encounters one that does not, it will fail. Also, you may want it to be a recursive function in case the light isn't located directly inside the object in Lighting.
This code will loop through every instance in workspace.Lighting and turn off any PointLights:
1 | function LightsOff(Instance) |
2 | for i,v in pairs (Instance:GetChildren()) do |
3 | if v:IsA( "PointLight" ) then v.Enabled = false end |
8 | LightsOff(workspace.Lighting) |