Proximity Prompt triggered event only works in certain areas

I made a dialogue system with proximity prompts not long ago, it was all working fine before until I tested it today and it no longer works. Only the prompts used for npcs which are within a range of the player’s spawn actually trigger, which is really weird.


(the npc in green’s prompt would fire, however the one in blue’s wouldnt as the player spawns further back)

The way I’ve done this is by using collection service to tag all the prompt parent parts, and using a singular script to actually show the dialogue.

local collection_service = game:GetService("CollectionService")
local parts = collection_service:GetTagged("npc_prompt_parts")

for i, v in pairs(parts) do
	v.ProximityPrompt.Triggered:Connect(function()
		local module = require(game.ReplicatedStorage.modules.DialogueModule)
		module.CreateDialogue(tostring(v.Name))
	end)
end 

Completely stuck on how to solve this, I’ve tried to make the player spawn in the middle of the npcs but some are always cut out and sometime this doesn’t even work at all. I tried the “RequestStreamAroundAsync” function on a part’s pos in the middle of all of this area which hasn’t worked either.

1 Like

Try using ProximityPromptService instead.

1 Like

This didn’t seem to work, I’m using the PromptTriggered event and all the prompts seem to be running the same dialogue now.

1 Like