Hi, I’m just wondering if this is a viable way to use PlayerRemoving:
game.Players.PlayerAdded:Connect(function(plr)
game.Players.PlayerRemoving:Connect(function(player)
if player == plr then
--code here
end
end)
end)
Or should these two functions be entirely separate?
I’m thinking about using this so I don’t have to call :GetAsync() on my datastore twice in two separate functions. What if :GetAsync() doesn’t fail on PlayerAdded, but it fails on PlayerRemoving?