Basically when someone leaves it makes the door not owned anymore but only for that certain person. Thing is sometimes it doesn't catch it fast enough but I want it instantly to make the game seem clean.
game.Players.ChildRemoved didn't work so thats not a option. Is there a better way for this?
Script: ServerScript in the model.
function StartCount()
wait(2)
if game.Players:FindFirstChild(script.Parent.Parent.Owner.GUI.Owner.Player.Value) == nil then
script.Parent.Owned.Value = false
end
end
game.Players.PlayerRemoving:Connect(StartCount)

3 comments
Please provide more details, such as the script type and location of script, as well as any output errors/warnings.
I guess the wait is slowing it down.. But I think you may need it, beacause the player name may not have been removed from the players yet. Not quite sure.
There are no errors, I jsut want to know a more effective way to remove it. The wait() is slowing it down.