local player = game.Players.LocalPlayer
game.Workspace.Proximity.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr == player then print("Player touched") game.Lighting.old.Enabled = true
wait(5) local player = game.Players.LocalPlayer
game.Workspace.Proximity.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr == player then print("Player touched") game.Lighting.old.Enabled = false
end
end
end)

3 comments
uh can u use that blue circle button and put the script inside the squiggly lines? this is extremly hard to read without proper lua form
sorry its being buggy for some reason
attempt to understand error messages better, its going to benefit you a lot