Making a GUI stay the same size and position

Hey! I’m trying to make a custom ProximityPrompt using two different SurfaceGuis. What I’m noticing is that the progress bar GUI above the ProximityPrompt will move positions when the player moves their camera around instead of staying near the prompt. Just wondering how I’d fix this? Would it be something to do with changing the AnchorPoint or would it need to be scripted or something else?

PS. If I posted this in the wrong topic, let me know

1 Like

Hi roman :wave:
I may be wrong here, but it seems like your bar is being offset using studs which may change the position of the bar relative to the prompt when you move your camera closer/further away from the part.
Could you try removing the stud offset and instead move the bar up using pixels instead?

2 Likes

Sure! Would I use Scale or Offset?

1 Like

scale on ui size and position
same on anything inside it

2 Likes

Use offset as it is calculated in pixels

2 Likes

If you want a UI to stay the same position and size, you should never use, offset. Offset doesn’t adapt to different resolutions therefore it will appear messed up. You should nearly always be using Scale

2 Likes

Thank you all for your help, I really appreciate it. @Apicphis had the solution in the end but @Velliaan helped a lot by answering my question.

Appreciated. :heart:

1 Like

From looking at the ProximityPrompt’s GUI, I can confirm that it’s AbsoluteSize always remains the same when you zoom in/out.
By offsetting the custom frame by 50 pixels from the centre of the ProximityPrompt, I was able to achieve this: