-
What do you want to achieve? A ProximityPrompt that disappears and disables after interacting with it
-
What is the issue? When Interacting with the prompt, it doesn’t hide, and instead just removes the ActionText and ObjectText (see attachment)
-
What solutions have you tried so far? I’ve tried firing remote event to disable the prompt but still the same result.
the code is in a server script, I also need it in a server script for security reasons.
attachments
the code I’m using:
ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function()
ProximityPrompt.Enabled = false
print('special message') -- it prints the special message just fine
end)
heres a video of it in action:
Try using ProximityPrompt:Destroy()
,
and if you need to still save it for later, then you can do something like:
local clone = ProximityPrompt:Clone()
clone.Parent = game:GetService("ReplicatedStorage")
ProximityPrompt:Destroy()
2 Likes
It didn’t work, it still displays. I’m now almost sure it’s a bug in server → client communication though, because the prompt is only gone from the server. I’ll try using remote events again but with :Destroy().
dam
chances are it’s a roblox issue then, if even destroy doesnt work
can you send me your explorer hierarchy?
It worked for me, can you check if you do not have any other proximity prompts in it ? That may cause the problem.
I tried using remote events and it still didn’t work.
here’s the ProximityPrompt code
ProximityPrompt = script.Parent
RemoteEvent = game:GetService('ReplicatedStorage'):WaitForChild('RemoteEvent')
ProximityPrompt.Triggered:Connect(function(Player)
RemoteEvent:FireClient(Player,ProximityPrompt)
print('special message')
end)
and the localscript:
RemoteEvent = game:GetService('ReplicatedStorage'):WaitForChild('RemoteEvent')
RemoteEvent.OnClientEvent:Connect(function(Prompt)
Prompt:Destroy()
end)
also do I just send a screenshot of the hierarchy?
Can you send a screenshot of your explorer ?
I have 2 signs they are exact replicas of each other, here’s an image of the heirarchy that the signs use.

So you do not have any other proximity prompt in it, hmm. Try restarting studio then.
one piece of info that might be of value is I’m currently using wine to run roblox on a linux computer, but I tried this on my windows computer and it still gave the same problems.
Also make sure you do not use localscript to delete or disable it.
1 Like
It will not work if you will use localscript to disable it, make sure you use script for it, and you can try this code, I don’t think it will change anything as it works similiar to the @blackxfiied code but maybe…
Script
ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function()
print('something is happening') -- your code goes here
wait()
ProximityPrompt:Destroy()
end)
If this will work you can change ProximityPrompt:Destroy()
to the ProximityPrompt.Enabled = false
and it should still work.
I tried restarting studio and using your script. but it still didn’t work. maybe I’ll try make a new baseplate and use it there. also can I ask what the random wait()
is for. why is it waiting for a frame?
No its like really small delay between your script, and deleting the prompt as your script is inside your prompt, script will be deleted with the prompt. This wait() makes sure it wont be deleted at any cause before everything higher is executed. I don’t think its necessary but I use it.
1 Like
it worked! in a different baseplate it worked! I’m pretty sure something corrupted in that experience because I’ve had other bugs before. but I never though it was because of the game.
also one more question. since this is a me problem and no one else will be likely to come across it, should I delete it or something so it won’t show up in google results and stuff? or just leave it.
You could delete it, but I have a question. What is in your Build folder inside that sign ?
its just the bulding. like parts and stuff.

Oh, then I don’t know whats the problem, if there is not any other proximityprompt