Disable playerlist at specific times

Well, the gui is either: enabled = true/false, but I change the enabled value on the playerGui.

So, if I write
Game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
wouldnt that disable the the player list for all of the players?

or am I misunderstanding something @incapaxx

But wouldnt that disable it for all players and not only the one specific player? @28Y8

2 Likes

No? i guess?

2 Likes

Oh! I’ll test that out at once! I will come back to you soon, thanks!

Hey, it worked!

But, does this also disable the playerlist for mobile phones? (Touch devices?)

Mobile devices don’t have playerlist. :thinking:

2 Likes

Oh, ok, thanks!

One last question though :sweat_smile:

First of all, I have made the topbar invisible. So, when I have a below the name, it doesnt register click nor hover overs… Is there any way that the button is, like above? Or something like that.

Set IgnoreGuiInset to true in the ScreenGui properties

That doesnt seem to work :face_with_monocle:
When I for eexample hover over the button, nothing happens.
One sec, I will make a gif.

Here,
https://gyazo.com/e50abde05e6d2e5660a6faaa8c035ce6

So, when the button gets hovered over it is supposed to turn silver. But it still doesnt detect the part that is under the name/top bar.

Only works from below since that part is under the top bar.

@Firzal_VX

It’s a bit complicated. Since the TextButton Click doesn’t work on Topbar, you can make own with UserInputService and MouseEnter MouseLeave event.

local Button = script.Parent -- Button
local UserInputService = game:GetService("UserInputService")
local EnabledClick = false

local function onHover()
 EnabledClick = true
end

local function onUnhover()
EnabledClick = false
end

local function onClick(input)
 if input.UserInputType == Enum.UserInputType.MouseButton1 and EnabledClick then
  -- Mouse click code
 end
end

button.MouseEnter:Connect(onHover)
button.MouseLeave:Connect(onUnhover)
UserInputService.InputBegan:Connect(onClick)

Didn’t tried it, but hopefully work. So basically this code checks if the button is hovered, then enabledClick set to true, if not then false. And UserInputService makes click event when the enabledClick is true.

1 Like

Just add this code where the shop opens:

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList,false)

and add this code where the shop closes:

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList,true)

Make sure it’s inside of a localscript and also make sure to mark this as a solution if this helps you out.

1 Like

Thanks, kind of annyoing that the topBar is so intrusive in UI work and design.

Anyways, i’ll probably not do that.

Thanks for the help so far!

Thats because roblox dont want us really modify the topbar :thinking:

1 Like

I do understand that, like, they want to keep like a simillar ui design throughout the games. But they should let us have buttons under the top bar!

Yeah, i also agree of what you said.

They will do when the new design comes out:

1 Like

Oh! That’s great.

How long does it take until that comes out?

Hopefully really soon! There was a lot of feedback on that thread though so perhaps they’re busy implementing some changes and addressing some design concerns regarding the icons.

1 Like

That’s great! Love your podcast by the way!

1 Like