UI-Visiblity Problem

Hello Developers, So I wanted to make a Stamina UI Using a surfaceGui but there’s a problem. Everybody can see their stamina bar. And I want it so only the player can see their stamina bar but I don’t know how to do that. Please help

Normally a Gui can only be seen by the player himself, not everyone.
Did you put this Gui in StartetGui>ScreenGui?

Are you sure you don’t wanna use a ScreenGui instead so its actually on their screen?

Otherwise just make it on the client.

Its like a 2d ui under the player like RB World. Only you can see your stamina bar but I’ve tried before and I was able to see other players stamina too it was a surfaceGui

It would be easier to understand if you upload a screenshot of your Explorer window, with these objects open.

I have never used StarterPlayer. I always leave local scripts and Guis in StarterGui. But apparently, this shouldn’t make a difference since in both cases the local scripts and Guis are replicated to Workspace.
Perhaps the problem is another one.
Can you send a screenshot when all players are seeing the same Gui?

I can’t right now but, It would display the same thing the original player is seeing to other clients too. I’ll see if I can when some of my friends are online

You could try making the Gui invisible then with a local script make it not be invisible so only that specific player can see it.

You can set the .Enabled property of the SurfaceGui to false, and then locally set it to true using a LocalScript. This way the SurfaceGui is disabled by default, so players won’t be able to see it, but it’s bypassed by setting it locally, so that a player can only see their own bar.

So to clarify step by step:

  1. Select your SurfaceGui image
  2. Make sure Enabled is turned off image
  3. Then in a LocalScript, set the Enabled property of the SurfaceGui to true locally, making it only enabled for themselves. If you need help with this part let me know, but for an example using your RSClient Localscript:
    local Bar = script.Parent:WaitForChild("Surface")
    Bar.Enabled = true 
    
    Should be as simple as that

Pretty sure this will work.

Handle the stamina UI in local scripts only. All UI should be handled by the client anyway.