ProximityPrompt Trigger Not Working?

Earlier today I was having some problems with the proximity prompts being triggered in one of my scripts so I got curious and tested something. I ran an extremely simple code yet it didn’t work:

script.Parent.ProximityPrompt.Triggered:Connect(function()
	print("IT WORKS")
end)

image

However, it does work in a new baseplate. I have checked and there are no modules/other scripts that are causing the trigger to not be detected on the proximityprompt. I’ve made sure it’s enabled and I just don’t understand what in tarnation is happening.

When you run the game, can you check if the ProximityPrompt is still there? Is something removing it?

No, it’s not being removed. However I found the issue I think. I change the camerasubject once the player spawns in then shortly after put it back to the character, I think that is causing the issue…

Try putting the script in the ProximityPrompt.

Edit: Could also be that the properties of the ProximityPrompt make it break. Or your output.

That is not going to help, of the ancestors of the script stays the same its anyway the same name

Could you show us the full explorer? Would you also try to tell us what ur trying to achieve

Could you disable that part and then try? I still don’t see the reason for this tho. If disabling it works then you can make your own proximity prompt system to work with it

It was to do with the camera subject. Solution was: Dont use a proximity prompt.

I have having this problem as well, no solution found.

This cause is correct. His solution … also correct.

Try placing the proximity prompt inside of an attachment. Also next time don’t bump up an old topic, it would be better and more helpful for people in the future who have this problem and these solutions don’t help, if you make a new topic where a new solution that may work for them can be marked as solution, being found easier.

THIS MIGHT BE A FIX! ok so basically have u teleported the players hrp anywhere before u did it if so, thats the reason! you have to position it with CFrame instead of position like instead of hrp.Position = position its hrp.CFrame = CFrame.new(position) thats what fixed it fro me

This can also be caused by a proximity prompt being out of max activation range on the server, while being in range on the client as for the UI to show up, but not actually be triggered.

Solving this because nobody ever seemed to directly find what was happening; the problem tends to happen because the proximity prompt is not yet loaded on the server. Try adding a delay before running the proximityprompt.Triggered() line and it should work.