local Enabled = true local part = script.Parent local spotlight = game.Lighting.GlobalShadows script.Parent.ClickDetector.MouseClick:connect(function() Enabled = not Enabled spotlight.Enabled = Enabled end)
output message reads: 21:38:58.529 - Workspace.Part.Script:7: attempt to index upvalue 'spotlight' (a boolean value)
i have no clue how to fix that