A case where ProximityPrompt is firing .Triggered twice instead of once

I had a found a case where ProximityPrompt will fire .Triggered event twice instead of once even though I triggered it once.


Expected behavior: ProximityPrompt fires .Triggered event once.

Current behavior: ProximityPrompt fires .Triggered event twice in a special case that I found.


This piece of code will work properly:

local prompt = Instance.new("ProximityPrompt")
prompt.Triggered:Connect(function()
	print("I am triggered once")
end)
prompt.Parent = script.Parent

However this case that I created fails to work properly as stated in the title.

Repo File: WillTriggerTwice.rbxl (30.2 KB)

2 Likes

To add to this, it does not occur if you add any delay between the creation & event connection and setting the prompt’s parent. For example, adding task.wait() before setting the parent OR wrapping it in task.defer will fix the issue.

3 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

3 Likes

Sorry to revive a very old post. To close the loop, I’m commenting to let you know this issue should no longer happen. Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.