Proximity Prompt Release

You can click on the purple text to view it’s descriptions.

1 Like

This is a great feature!

Unfortunately, it came out late for me to use the key interact system and I already coded my own key interact system. I’m not sure if I’m going to use it on an upcomming RPG game I’m working on because I don’t want to take the extra time to work on it but maybe instead, I’ll use some parts off the API and use the existing GUI as the custom one.

If it came out earlier, I would have used the feature right away because it saves a lot of time from coding the key interact system which is time consuming.

I wonder how much this new feature will impact performance. I want my upcoming game to run at an acceptable and playable frame rate on mobile devices.

7 Likes

Pretty sure theres a property for that named “RequiresLineOfSight”.

Will this mean deprecation of Click Detectors?

I don’t see how this post has any relevance to click detectors, but I do agree that click detectors could be deprecated due to their unreliability.

3 Likes

For those who want to easily customize prompts, I really recommend using Prompts+:

It’s really useful

8 Likes

Is this hard-coded to work with player.Character?

I assume this uses some sort of spatial partitioning algorithm to speed up distance checking between proximity prompts and players. Is there any way Roblox can expose that as well so we don’t need to implement our own? This would be able to be used much more versatily/generically.

26 Likes

I was hoping for a way to add multiple interactions to one ProximityPrompt instance. This would likely require a toggle switch on the instance itself and a way to add the interactions through scripting. Something like Prompt:AddInteraction(name, key, ...) I mentioned this on the last post and was hoping it might have been added by release. Maybe there’s still time who knows. Unfortunately without this ability I’m going to have to resort to the old way. It just doesn’t make sense for me to have to do the hacky things I did to make it work the way it should have to begin with. I wish some features that are released could have features aimed specifically at the scripting side of things, obviously they need to be developer friendly but handicapping the feature isn’t a great idea either.

Just my two cents.

1 Like

Good question. The line of sight check is only clientside, from the camera to the prompt. It won’t guard against, say, a player using an exploit to interact with a nearby object on the other side of a wall. Do you anticipate this being a problem?

3 Likes

For me personally this is another gripe I have with this system, I know you guys can’t provide a blanket solution to this without damaging people who use custom characters etc. But for me it’s not realistic to assume the player won’t try and cheat the system and get around the visibility check. Especially in games where you are only meant to interact with this from one side. In certain cases this can be game breaking where you intend a player to go through a certain area but instead they can interact through the wall.

I posted this a while back:
https://devforum.roblox.com/t/how-do-you-do-it-interactions-with-objects-near-character-hold-e/600157

I’m happy that the system I asked the community for their solutions on now has an official feature supporting it :smiley:

2 Likes

Finally it’s out! I’m just wondering if the bug I initially pointed out on the beta test is still there with mapping an action to a function key?

Thanks for your interest in the feature! Yes, all standard keyboard keys show up correctly now, including the function keys.

3 Likes

That’s good that it’s fixed, have a nice day!

1 Like

That’s not a bug, you most likely have “Requires align of sight” enabled.
In order to fix this you can go to the proximity prompt settings and simply disable it.


with the part being inside the other part it’ll classifies it as a object thats blocking its line of sight from the middle of the part to you.

Edit - Fixed my terrible grammar

1 Like

Thank you for that, I didn’t even know what that property was for. I thought it was a bug until you told me. :smiley:

1 Like

No worries, Its a new object. Not a lot of people know how to use it yet

1 Like

This is a great and useful tool that will help a lot of developers! Glad to see that Roblox is heading towards the right direction!

This might’ve fit better as a thread in Developer Hub but if the Proximity Prompt team is still taking feedback for the feature and its documentation, just wanted to make a quick mention I saw a bit ago. This is for ProximityPrompt.Style’s code sample to emulate the default UI.

local LocalPlayer = Players.LocalPlayer
while LocalPlayer == nil do
	Players.ChildAdded:wait()
	LocalPlayer = Players.LocalPlayer
end

LocalPlayer is implicitly available to all LocalScripts[1]. This method of waiting for the LocalPlayer is archaic and doesn’t need to be used, unless there’s some kind of edge case this is accounting for. Would be great to remove the while loop so newer developers don’t learn this old habit!

11 Likes

Thank you. I had a game that we needed interaction like this but we had to create it from scratch. This method seems 10 times easier and seems more clean.

4 Likes