~~~~~~~~~~~~~~~~~
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)
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 end end end) 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)
Try the above code and see if that works