Players dont go back into the game.Players

Yeah, you can’t if you run the code server-sided.

1 Like

im trying it on the client and also player is the second player

Why are you trying to kick and again bring the player, that’s just not possible.

Maybe you want to despawn a player’s character and load again?

1 Like

It doesn’t matter if you run it client-sided or server-sided, you can’t change the parent of a player and not get them kicked. However, you can change the parent of a player character. Maybe you wanted to do that?

when i try to do the code on client on all players expect for ONE and thats the gui owner they dissapear BUT dont get kicked and they still can chat, but trying to undo it they dont go back into Players service

So let me get this straight, you parent every other player nil from a different player’s perspective. If so, yes, they would be able to chat because you only removed them on that player’s side, not the server side. But if you try to parent the local player as nil, then you do get kicked.

i want to make them GO back into the service but they wont go back and it often breaks stuff because ONLY player can see ONLY himself but others as SPIRITS who chat.

so is it now possible to bring back players, is there a hackish way to falsely delete players and put them back? i just need it for my game

Do you just want to delete them off the player list and Roblox GUI (esc)?

yeah, i remove players so people wont see them, but how would i hide players off the list especcially the main menu and disable their chat? and then undo it later after a second

I don’t know how to really bring them back, but this may work. Try making your own player list delete the player, and when you want to bring the player back add them to that list using GUI.

1 Like

To mute them check out this topic: How to make a mute command? - #3 by Extrenious

Lol, I wasn’t aware you could kick the player that way, what’s even more interesting is that you can stack it on top of calling kick but not vice versa:

game.Players.PlayerAdded:Connect(function(player)
	player:Kick()
	task.wait()
	player:Destroy()
end)

Also if task.wait() is commented out the behavior changes, instead of getting:

You were kicked from this experience:
Player has been removed from the DataModel

you get:

You were kicked from this experience:
You were kicked from this experience: You have been kicked from the game

Also, the first version(with task.wait()) also causes a small lag spike between the 2 messages and doesn’t load the game at all, were the second version loads the game even tho the player gets kicked.

you literally cannot bring them back from nil, in programming nil is non existent so your just removing them from the game

try removing their character or something by doing Player.Character

Just a quick correction, if you parent an Instance to nil, that doesn’t necessarily mean that it can’t be brought back; Instances parented to nil will only be garbage collected once there are no more references to it

In this case however, the engine automatically kicks the player once you remove the Player Instance

2 Likes

Yeah, I forgot about that. I said that because before running that code, it said it was marked for deletion. Thank you for correcting me.

^^

Just for some Roblox history @pumpkyrofl, it was possible to utilize this on players until 20th of April this year.

Before the update that disconnects players from the data model, it was possible for devs of famous games to hide in nil and observe/investigate/… Sneaky lol.

Players don’t get disconnected (right away?) if you don’t disconnect manually. I’ve done a lot of tests, and came to the conclusion that it’s great to have the following clear the player.

Players.PlayerRemoving:Connect(function(player)
	-- clear character
	-- save data
	task.wait(10) --> some reasonable time
	player:Destroy()
end)
1 Like

The solution became (post deleted by author) so why not solve the topic?

I do believe putting the Player instance to nil would kick the player, so that’s a bad idea :confused:

I did that by accident I have been rate limited for 6 hours after that I will undelete it if I can but the solution was that you can’t parent it nil without kicking

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.