How to make ProximityPrompt stay on screen

Basically I am recreating a game with a friend at the moment, and by recreate I mean I want the games to be inseperable. But for that I need A ProximityPromt to stay on screen in the sense of:
(for context I am recreating scp containment breach since its open source and has no copyright I can just use all models and textures from the source code.)
The Prompt should be always visible even when your back is to its part.
It should only hover close to the part unless youre directly looking at the part.
It should always stay until you go out of reach.

I haven’t really found anything as of yet that is why I am making this. (plus I just saw I can post now so first post lol)

you cant do promixity prompts like this, you should script your own proximity prompt.

i suggest you taking a look at Dot Product.

Can you go into detail? I searched it up and don’t quite get how you could use it. I am not a really good scripter. I’ve only done small things here since a few months ago or something.

Dot Product - Youtube

Custom Proximity Prompts - Youtube

Look this video, ill send you more resources soon.

If you did not understand where to use dot product after watching these videos, tell me, ill explain you more.

mark as solution if helped, have a good day.

still figuring it out. Just gotta get this through my head

Dot product is also used for enemy NPCs, to see whether the player is in the NPC’s field of view or not, maybe that helps you understand a bit

Soo uh I think I kind of get it… So uhh I’m just gonna mark it as a solution. Thank you Kind Stranger. I still have to play around with it to fully understand it. I hope I can ask you for help along the way!

yes, of course, feel free to ask me questions, have a good day.

Im sorry to bother you but I cant really think of a way to utilize dotproduct. It probably is th answer I just dont know how to apply it you know? Maybe you have an Idea ??

look at the video in your topic, from second 3 to second 7

So I should make it look around the player and if it finds a button just make the gui appear near it somehow??

i said you to use dot product because you said you want a proximity prompt which always showes

So proximity prompt around the uuuuuuuuuh button?

I still dont get how to so im just gonna remove solution until I somehow find out

like i said, this is very advanced, you have to have so much experience in roblox studio.

Basically code a custom prompt UI that instead of being under BillboardGui is under a ScreenGui.
Hook it up to the PromptAppear signal from ProximityPromptService and whenever this signal fires, update the position of the prompt UI and make it visible if it was hidden.

Update the prompt position everytime the part has changed positions relative to the camera.
So if you turned the camera, it would move with it.

Use Camera:WorldToViewportPoint for converting the 3d position into 2d.

Try not to use Tweens for this as it could cause issues if you were quickly changing adornees.
For mine I used a spring module, I suggest the one below as it’s very good.
[Spring | Nevermore]

If you want the UI to stay on screen even when backwards to the prompt, clamp the values to the screen size.

yes, but this is a little bit advanced level.

he needs so much experience

if the part is not in player camera when he do WorldToViewportPoint, then he should use dot product