Okay, so I just need it to where it checks to see if the 'Owner' (string value with a players name) has left the game. This is what I tried:
if game.Players.PlayerRemoving and game.Players.PlayerRemoving.Name == script.Parent.Owner.Value then
Okay, so I just need it to where it checks to see if the 'Owner' (string value with a players name) has left the game. This is what I tried:
if game.Players.PlayerRemoving and game.Players.PlayerRemoving.Name == script.Parent.Owner.Value then
Yes you can check, you were close. You have to say:
game.Players.PlayerRemoving:connect(player) --The Player
if player.Name==script.Parent.Owner.Value then
--run code
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
W001: Unknown Global 'player'. Can you fix that?
According to the wiki that shouldn't have resulted in that error. Since player is in the connection line. It needs to be in a regular script not a local script. Make sure.