Recently, I experienced a very tricky bug where, only on occasion, proximity prompts were firing the .Triggered event twice.
Based on this devforum reply, I believe I’ve deduced the issue to stem from reparenting proximity prompts.
Here’s the code that caused the issue:
local newProximityPrompt = Instance.new("ProximityPrompt")
newProximityPrompt.Parent = interactionPrompt
newProximityPrompt.Triggered:Connect(function() print("Proximity prompt triggered!") end)
Here’s the code I am currently using that seems to have fixed this issue:
local newProximityPrompt = Instance.new("ProximityPrompt")
newProximityPrompt.Triggered:Connect(function() print("Proximity prompt triggered!") end)
task.defer(function()
newProximityPrompt.Parent = interactionPrompt
end)
Has anyone else recently had this issue? According to the devforum post I linked, this issue should be resolved, however I still seem to be experiencing it.