Hiding players from player list

Adding on yet again to what @SummerEquinox said, you can build your custom implementation off of the one implemented in the core gui. The files are somewhere in [user]/AppData/local/Roblox/versions/[version]/content/scripts. But it will eventually fall out of date and require maintenance to add new features. I would use Git to add your changes onto the file, and merge your version with Roblox’s updated one every so often.

4 Likes

I might’ve made the question a bit confusing. Similar to what @Starception said, I do want to hide a single person, but from everybody.

1 Like

You can’t hide a single person from everybody if you’re using the CoreGui PlayerList. As I stated above, I would recommend hiding the entire CoreGui PlayerList, or creating your own.

Additionally, in response to your initial question - there is no way to hide players in the escape menu either.

1 Like

Strange. I’ve seen it done in Parkour before with a command. Other than that, I’ll see what I can do. Thanks for the help!

1 Like

You may have seen modifications occur via a recreated CoreGui PlayerList - it is not possible with the actual CoreGui’s PlayerList. Go into that game and see if you can friend/follow someone through the player list.

2 Likes

Yes, it functions exactly how the normal CoreGui player list does. I also have a video example:

It is a real player. He talks earlier in the video and acts just like a player would. You can see in the tab gui his username (Somatikos) is not shown.

2 Likes

You can probably do this by calling Destroy() on the player you want to hide from a LocalScript on every other player, but I don’t recommend it as it can break things.

10 Likes

Super interesting! As Khodin said it probably isn’t a good idea to rely on this; however, it does seem to work.

Currently I’m running this code on client startup:

game.Players.PlayerAdded:Connect(function(Player)
	game:GetService("RunService").RenderStepped:Wait()
	Player:Destroy()
end)

It seems totally possible to control which players in the CoreGui PlayerList are visible to each client locally - but it would probably take a lot of time and proper manipulation. This also seems to be interfering with some core scripts, so you may need to find ways to deal with that.

5 Likes

What about locally parenting a player to nil and holding to it with a local variable inside a local script? This might work.

1 Like

For sure! Even though I didn’t make the thread this stuff is super neat. I’ll give that a shot tomorrow!

If it works then OP might actually get a solution to this.

1 Like

This is done by coping the PlayerList in CoreGui and then Replacing it in the PlayerGui, this is what Scammers do to trick kids into thinking Roblox, BuilderMan and other people are in the game etc.

1 Like

If I’m not mistaken doing that removes functionality - which is why this thread wasn’t a crazy simple solve. He references games that have all UI functionality and the ability to hide players from the CoreGui PlayerList.

1 Like

There is no official way of removing a player from the Default PlayerList (yet).


I’m not entirely sure but you can also copy the scripts, the only reason it won’t work properly is because of the Script Level Difference.

He can do Player:Destroy() that will definitely remove the player from the list.

3 Likes

Yes, the :Destroy() option was being discussed above and actually does seem to work fairly well - but it also interferes with some core scripts from what I saw.

2 Likes

Is there any way to counter this? I tried using :Destroy() and it removed things like the a ability to type, move, move the camera, etc.

1 Like

I tried what Khodin said, and it worked pretty much flawlessly. You could still move and talk and everything. The only thing I see that’s wrong is now the camera treats the hidden player as an object, instead of just going through it.

In case you were wondering, here’s the script:

game:GetService("RunService").RenderStepped:Connect(function()
	local plr = game.Lighting.hiddenPlr.Text
	if game.Players:FindFirstChild(plr) and script.parent.parent.Name ~= plr then
		game.Players[plr]:Destroy()
	end
end)

This script is placed in StarterPlayerScripts. Also, the hiddenPlr value defined by a chat command.

2 Likes

I would start by not running this on RunService, use the changed event and just update whenever you make an amendment to who the hidden player should be. Then, once you’ve done that, hold the current hidden player’s player object in a local variable and return it to its previous state on the client whenever your changed function runs.

As for it breaking things such as chat, I can’t say that I can think of any immediate solution as it probably interferes with some portion of the chat’s CoreScript. I think you should probably provide a reproduction and let people tinker with it and see if they can come up with some creative solution - other than that it might be as deep as this goes.

I tried using changed and it would just never return a string.

You need to make sure wherever you’re watching the IntValue is also where the IntValue is changing - be sure you aren’t monitoring it from the server, but changing from the client.

I’m using a TextLabel to hold the sting value for the name. Also, I don’t see why changing the value from the server would be a bad thing to do.

1 Like