Hi everyone, I’m tinkering around with ProximityPrompts for my shop, and I want the ShopGui to close when the player walks away from the NPC. However, I didn’t find any event that fires when the player leaves the “proximity”. Is there any way to do this?
I’m hiding the ProximityPrompt(Enabled = false) when the ShopGui is open, so using PromptHidden doesn’t work.
Edit: Constantly checking the magnitude of the character and the NPC’s torso is one solution, but I think that could cause a lot of lag.
If you could implement sanity checks, like if the game knows the player is on Island 1 because they fired a remoteevent to enter that Island, it wouldn’t check for magnitude fo things that are obviously far away.
Also I don’t think it would cause a lot of lag anyways. Magnitude is a property if I recall correctly, not a yielding or expensive function.