How to stop Surface Gui from being seen through parts

I have a sign that uses a surface GUI, but it can be seen through a part. How do I stop it from showing up after walking x amount of feet away?

picture of problem:

I’ve searched google, the forum, and I tried Z-index but I don’t know how to really use it.

Thanks for reading !

z index controls layers of gui respective to thier gui type.
and (as far as i know) as not an apllicable solution.

1 Like

You could possibly write a script on the client that detects how far away the player is from the part with the gui on it, and if they are a certain distance away, make it not visible.

2 Likes

I’m not a scripter sadly, I wouldn’t know where to start :woman_shrugging:

I came up with a rough outline like this:
local player = workspace.starterplayer
local gui = workspace.sign.surfacegui

If player [walks 100 feet away] then gui = false

But as you can see, I’m not good at scripting.

What exactly are you working with rn cause you might be able to use a billboard GUI.

1 Like

Do you mean my hierarchy?
Screen Shot 2020-02-27 at 2.16.44 PM

SurfaceGui has a property (AlwaysOnTop) if you disable it, this shouldn’t be a problem

5 Likes

I’m currently working on something similar however, I have parts infront of a surfacegui that does not have the always on top property enabled, and it still clips over.

Please note, the part is relatively close to the surfacegui and ive experienced similar behaviour before… however, I don’t really have a work around for it in my current application.

Does anyone have a solution?