Hey everybody i am struggling trying to make a gui appearing on the screen showing where certain parts are. To show you guys what i am trying to do here is a concept
As you might be able to see the part has a red gui around it which will always be there showing where it is how can i do this i have been trying for a long time now but max distance is Inf but can not be seen so im shooting for just a onscreen gui.
Yea ViewportFrames are probably your best bet, unless you want to script a very complicated 1000 lines of code script. Just make a ViewportFrame, put the parts you want to show inside of it. And make the CurrentCamera of the ViewportFrame, the localplayer’s CurrentCamera. Then, the parts will overlap everything in the workspace.
Looking at this I think Viewport GUIs are used to make parts appear on the screen, like how Bubble Gum Sim uses it to make the eggs appear on screen when you open them.
I may be interpreting this wrong; but if you’re using a BillboardGui in a BasePart you can set AlwaysOnTop to true and it will go on top of any parts in front of it.
Ohh… I see. You should look up WorldToScreenPoint! This tutorial shows you how to get the position and depth on the localplayer’s viewport, from a Vector3 point. Then, you can put a frame (of arrows pointing to the middle of the frame) where the screen point is.
Or, you can use BillboardGuis (much easier). If you want to do this, make a template BillboardGui. With TextLabels and stuff named “Username”, “HealthBarContainer”, etc.
Well. You could look up WorldToScreenPoint… Like I said… But basically, it creates a ray that starts at a Vector3, that then points and ends at a Vector2 point on the local player’s screen. Then you can manipulate the ray to give you the end position, so you can then move a frame’s position to the Vector2 point as a UDim2. Theres also ScreenToWorldPoint I believe, which is the other way around.