Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to prevent players from hiding in nil?

Asked by 4 years ago

Players in my game are hiding their selves in nil to troll or stalk.

game.Players.LocalPlayer:Destroy()

I been trying to prevent this with PlayerRemoving or Changed but this seems to not work. Any help?

0
maybe every 30 secs you can loop through all the players and check if their characters are in the workspace and of they arent then you can parent them to the workspace (and keep their position if you want to) Fad99 286 — 4y
0
Yes, but how would you restore the player back to Players? Or kick them? BurgerKingHappy_Meal 25 — 4y
0
I don't think you have to worry. The players are only deleting themselves on the client, which means they still exist on the server and for everyone else. So although it may seem like they're in nil, they're not. User#20279 0 — 4y
0
They are using it though serverscripts with require() BurgerKingHappy_Meal 25 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

I saw this post a while ago and it stuck in the back of my mind as something I may need to address. I'm not sure if this is a solution to your problem or not, but it's at least something.

I found this link today when researching a problem I was having with my saving script: http://devforum.roblox.com/t/psa-connections-can-memory-leak-instances/90082/13

More specifically, on posts 13-15 jewelycat and Quenty discuss how character and player instances get parented to nil. It seems you'll need to sever connections from the character when they die. The link explains it a lot better than I can.

Ad

Answer this question