How do I detect if a player is triggering a proximity prompt?

I would like to know how do I detect if a player is triggering a prompt.
Any help appreciated.

ProximityPrompt.Triggered:Connect(function(player)
print("The user interacted with me!")
 end)

or use

PromptButtonHoldBegan

https://developer.roblox.com/en-us/api-reference/class/ProximityPrompt

1 Like

The print fires after the prompt is finished. I need to see when it is being triggered.

Yeah my bad I edited my reply.

1 Like

Use PromptButtonHoldBegan for that.

2 Likes

Thanks I didn’t realize that while scrolling throughout the events

1 Like