I had a huge issue in my game ([URGENT] Plots not destroying - #10 by coolgueo), and eventually I fixed it by changing “PlayerRemoving” to “ChildRemoving”. PlayerRemoving sometimes does not fire which caused “ghost bases” in my game.
Thanks for responding. It still occurs, but I’m confused on why you’d need a log because it is a server event.
I don’t have any specific date and time this happens as it occurs randomly.
But change it to your game since the link at the top has it set to 1. Do you see any errors by chance?
This is a useful page, and an alternative over debugging with webhooks for capturing logs from the Client and Server, that occured on a Live Server.
If you don’t see anything, try to put a warn("test") or similar right at the start of the callback for all .PlayerRemoving you can find, and let it run for a bit. But since you said that some do run and some do not, try to put more of these around the code maybe there’s a step that isn’t working as expected? At least, you should verify that.
And or then you can check it in the console in-game, you don’t even need to use the analytics. Unless you’re already doing that?
If the player’s base didn’t get removed, do you by chance see the name of the player who’s base didn’t get removed. If yes, you could eventually add the player’s name into the warning, at each place as well to debug.
Point is to get evidence and confirm that it actually doesn’t get called, by doing it like this. I think it takes a little bit time for fresh logs to show up in the analytics.
Players.ChildRemoved:Connect(function(player: Player)
local plot = Plots[player.UserId]
warn(`{player.Name} is leaving`)
if plot then
plot:Destroy()
Plots[player.UserId] = nil
else
warn(`No plot found for player {player.Name}`)
end
SessionData[player.UserId] = nil
warn(`{player.Name} left`)
end)
Setting it to immediate seems to have made it more frequent from what I’ve seen also
Yes, and then when you join in-game you should be able to see these warnings in the console to verify whether it ever went through the entire function or not.