Hi, I’ve been frustrated for days because my ProximityPrompt is not disabling, and I don’t know why. I’m starting to think it’s because this ProximityPrompt is getting enabled in a localscript could that be the case?
Sounds like you’re trying to run a client script from the workspace, which is not possible. Client scripts can only run if they’re descendants of certain things, and the workspace isn’t one of them (more information here). As a workaround, I suggest putting the code in a server script then setting the script’s RunContext property to Client.
If so, it won’t run as it is a descendant of the workspace. A LocalScript must be a descendant of:
Player’s backpack
Player’s character model
Player’s PlayerGUI
Player’s PlayerScripts
ReplicatedFIrst service
Thus you should make the function execute in a LocalScript located in one of the mentioned locations, preferrably the StarterPlayerScripts for ease. Make a variable for the ProximityPrompt in the workspace and connect a function to the trigger as per usual.
Yes since your activating it only on the client and not replicating to the server the server is tracking that the prox prompt is not enabled to begin with.
Try using a remove event and see if that helps you out.
The script you put here is going off what the server sees, which, according to my understanding, is Enabled being set to false. Enabling the proximity prompt on the client does nothing because the server doesn’t see it as enabled as well. Is there any reason the prompt couldn’t already be enabled when the game starts?