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

2 Likes

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?

3 Likes

Sure! Would I use Scale or Offset?

1 Like

scale on ui size and position
same on anything inside it

3 Likes

Use offset as it is calculated in pixels

3 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

3 Likes

Thank you all for your help, I really appreciate it. @Apicphis had the solution in the end but @Vellian4Ever 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: