Proximity Prompt Service Triggered does not fire for cloned models/proximity prompts in real time

The title is pretty self-explanatory. I am creating a new game with maps being loaded in per session. These maps are hoisted as “templates” in the server storage, and each child is cloned into the workspace under a dedicated map folder. I have a simple central doors handler script that calls upon the ProximityPromptService and connects a function to the triggered event. The problem is, this event does not fire for the maps in-game when they are cloned/loaded in. If they are in the game from the start, it fires and works perfectly fine.

Although not really important, here is the code snippet that I am using:

--!strict
local ProxPromptService = game:GetService("ProximityPromptService")
local ServerStorage = game:GetService("ServerStorage")
local CollectionService = game:GetService("CollectionService")

local serverModules = ServerStorage.Modules

local DoorService = require(serverModules.DoorService)

ProxPromptService.PromptTriggered:Connect(function(prompt: ProximityPrompt, plrWhoTriggered: Player)
	print(prompt)
	print(prompt:GetTags())
	if not CollectionService:HasTag(prompt, "MapActivatableDoor") then return end
	
	print(`[Door Handler] Doing something I guess...`)
	DoorService:TriggerDoor(prompt, plrWhoTriggered)
end)

It does not print the prompt, nor does it print the tags for created prox prompts. Thanks for any help!

The server isn’t rendering the prox prompt rn, it’s being streamed out. I’m testing if this is actually the case but it sure does seem like it.

Nevermind. It’s super weird. It doesn’t work if I trigger it on the client, but the moment I switch to server view, then back to client view, it starts working. Any solutions (I am not moving the server camera)?

My only guess is something is yeilding before the connection not making it run, the only line that could be the problem is the door module. So try adding a print before and after the code to see if print right after each other or take a takes a few extra seconds before it does.

The door service does not affect it or yield. As said before, it does not fire for maps in-game when they are dynamically loaded/cloned into the workspace. If the map is already in the workspace from the beginning, there is no problem. In addition, requiring the door service does not run any function (as of right now).

Does it always work if you were to test it in the actual Roblox client?

Id try to localize the issue to a specific service. Try testing in the game client to see if the issue is isolated to studio. Try disabling streaming enabled to see if thats your issue.

Irrelevant to primary issue, but:

prompt:GetTags()?

Is this supposed to be collectionService:GetTags()?

only works if I switch to server view then back to client view.

There is no localizing issue. The only specific issue here is the fact that the proximity prompt service itself does not pick up triggered events from nearly created proximity prompt instances unless I quickly switch to server view then back. I do not move while in server view, which I suppose should not be loading in any new content or such. :GetTags() is valid method for instances, I just choose to use that for convenience.