Hey Guys,
Is there a way to display proximity prompts in front of active GUI? Currently When an active GUI overlaps a proximity prompt, and you try to click the Proximity prompt, the GUI registers instead and the proximity prompt doesn’t.
1 is an invisible active frame
2 is a Proximity Prompt
When a player clicks (or taps on mobile) in the area 3, the proximity prompt doesn’t register, but it does register when 2 is clicked outside 1.
How do I make the Proximity Prompt register?
Thanks in advance.
Hi!
I think you can’t do that as far as I know.
But you can still disable it by checking if the UI is opened. if it is, disable it. If it isn’t, enable it.
local ui = game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("GameUI"):WaitForChild("ShopFrame")
local shopProximityPrompt = workspace.Shop:WaitForChild("ShopProximityPrompt")
while wait() do
if ui.Visible then
shopProximityPrompt.Enabled = true
elseif not ui.Visible then
shopProximityPrompt.Enabled = false
end
end
Hope this helps!
1 Like
Sorry but my question might not be phrased clearly, what I mean is I want the Proximity Prompt to be clickable even when the active GUI is enabled. The invisible active frame is part of a custom joystick, so I really disable that either.
I think you can’t do that as far as I know.
Oh well, I guess I’ll have to find some other workaround then.
Thanks anyway.
So, just to be clear, what is ‘Triggered’ when you click? The GUI or the ProximityPrompt?
And, what do you want to be triggered? The ProximityPrompt or the GUI?
When clicked in region 3, GUI is triggered, and I want the Proximity Prompt to be triggered instead.;
For some reason, it works for me, I can click on the ProximityPrompt with an invisible frame on top (Couldn’t share the video since it was larger than 10MB)
The frame has to be Active.
1 is an invisible active frame
My bad, I forgot to enable the Active property.
Why enable this property in the first place when you want to trigger the ProximityPrompt?
I need it for my custom joystick script.
I guess my solution to this problem would be to rewrite my joystick script to not need an active frame (which is gonna take a while but oh well).
I don’t quite understand what you mean, I need to active frame there so when the player drags the joystick, it doesn’t affect the camera’s rotation. I’ve come up with an alternate solution to my problem now - I made the active frame smaller but visible so the player would probably see that there is a joystick button there and press somewhere else.
Not an ideal solution but works I guess.
Thanks a lot for you time anyway.
I meant you can move the joystick directly to the StarterGui and make it active instead of moving it in an active frame.
Thanks a lot for your time anyway.
No problem
1 Like
Oh, I did not know that, I’ll try that out, thanks.