Hi. I’m wondering how you would hide someone from the player list (in the menu and the tab GUI) while keeping them in game and able to move and stuff.
I’ve seen this done in multiple games before and was just wondering how this would be done.
While you can disable the player list on the right side of the screen, I don’t believe you can hide players from the esc menu. Please correct me if I’m wrong, as I’m interested in knowing this as well.
https://www.robloxdev.com/api-reference/function/StarterGui/SetCoreGuiEnabled
https://www.robloxdev.com/api-reference/enum/CoreGuiType
Simply call game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
on the client.
I believe he wants to hide one specific player, rather than the entire list.
For example, Little_Johnny is annoyed by RudeUser47 and decides to blacklist them. RudeUser47 is now invisible to Johnny, can’t contact him, and is hidden in the player list while RudeUser47 would still be able to play the game like normal.
Sorry, it’s late.
You can’t modify CoreGui, but you can write your own replacement for the playerlist on the right side of the screen that you have full control over. Only then can you selectively hide players. However, the esc menu showing all players in the server is still a problem.
Adding on to what @qqtt991 said, recreation of the PlayerList CoreGui would remove a good deal of its functionality. Personally, if possible - I would recommend just hiding the PlayerList for whatever portion of time is necessary. The functions of the PlayerList CoreGui are very useful to players, and I think removing it altogether would be a poor decision.
These are the two options I see:
- Regulate when the CoreGui PlayerList is visible.
- Create your own 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.
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.
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.
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!
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.
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.
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.
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.
What about locally parenting a player to nil and holding to it with a local variable inside a local script? This might work.
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.
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.
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.
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.
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.
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.