How to detect if player has hidden the player list?

So, I’m trying to show player’s balance that’s hidden under the player list.

So basically if a player presses tab, his balance appears in the place of the hidden player list.

I have also bind that to the B key, and made the B key disable playerlist.

Thats how I found out that when the player list is enabled, the UserInputService doesn’t detect the Tab button.

Is there any way to detect if the player list was hidden?

I don’t think there is something in the API that allows checking if the leaderboard is hidden. But I think a way to do it is finding the leaderboard in the CoreGui service and checking if its Transparency == 1 maybe.
Sorry I’m unable to test this in the moment

That won’t work since the topbar will override any mouse button inputs that are not from CoreGui.

This service is most likely your best bet. I’d assume that Tab is bound using this service meaning you should be able to replace the bind.

If you’re getting into the point where you want to know what’s happening with some Core UI, so you can do special things, I’d recommend just making the UI yourself. A custom playerlist wouldn’t be all that hard to implement. You’d just have to be checking when players enter the server & leave the server and put them into a table to iterate into the playerlist you make.

From there you can do all sorts of stuff of figuring out if it’s on or off, as well as adding extra features on top of it. If you’re worried about still having things like friend requests and what not, that’ll all still be covered in the CoreUI menu. I also believe it’s a feature you could put in, if I re-call correctly.

1 Like

I don’t think this wold be very efficient but considering there’s no word on that from anyone else…

Couldn’t you just count how many times they’ve pressed tab and go from there, if the count was even they have it closed, if it’s odd (or 0) they have it open.

there is no way to detect if tab was pressed - thats the problem.

UserInputService doesnt detect tab if the playerlist is enabled

Yes there is, Enum.KeyCode.Tab, it’s as simple as that. You may be using the “gameProcessedEvent” parameter, if so turn that off and it will work.

That parameter refuses to recognize any input while they’re typing, etc.

It only took me a few second to see, just don’t use that parameter.

Also, as for my last post. I’d just suggesting having a variable called “PlayerListOpen” as a bool, then changing it depending on when they press tab.

UserInputService does detect tab. If the player list is enabled, then GameProcessedEvent will be true because the PlayerList is using it. If this isn’t the case, you’ve found unexpected behaviour.

You can simply ignore GameProcessedEvent and proceed with your desired actions. Alternatively, you can run GetCoreGuiEnabled after detecting input and set the visibility to the negated result of the call.

1 Like

Oooh, I forgot about that.

Alright, that fixes the problem, thank you!

1 Like

This is not a reliable solution. Players can also toggle player list visibility by clicking on it.

1 Like

So, is the only solution to create a custom playerlist?

I don’t know if it’s possible but maybe this could help also creating a custom playerlist would be easier I guess.

Is there any way to find what part of the CoreGUI the player is clicking?

Bumping this to see if there are any foolproof methods that anyone has come up with since this post, however involved the solution may be

You can do any of the following,

A) Create a custom leaderboard and check if transparency or positioning is set to what you would like it as.

B) Use USERINPUTSERVICE as a way to detect if TAB is pressed on your keyboard.

Although CoreGUI Isn’t directly editable or accessible to users it is best to create a custom leaderboard using the Leaderboard CoreGUI template in which you can find online.

Use USERINPUTSERVICE as a way to detect if TAB is pressed on your keyboard.

Bad. Players can close the leaderboard by pressing the button on the coreui.

image

1 Like