My purchase house script is working for when someone is trying to buy it, but when they leave the game it still says they own it until a new server.
debounce = false script.Parent.BuySign.Buy.MouseClick:connect(function(player) if game.Players:findFirstChild(player.Name) ~= nil and not debounce and game.Players:findFirstChild(player.Name):FindFirstChild("HomeOwner") == nil then if player.leaderstats.Cash.Value >= 500 then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - 500 debounce = true script.Parent.BuySign:Destroy() script.Parent.Owner.Value = player.Name local own = Instance.new("IntValue") own.Name = "HomeOwner" own.Parent = game.Players:findFirstChild(player.Name) end end end) game.Players.PlayerRemoving:connect(function(player) if game.Workspace:FindFirstChild(player.Name.."'s House") then game.Workspace:FindFirstChild(player.Name.."'s House").Owner.Value = "" game.Workspace:FindFirstChild(player.Name.."'s House"):FindFirstChild(player.Name.."'s House").Name = "Buy this house!" end end)