How would I go about playing a character animation after a proximity prompt is finished?

What I am trying to achieve here is a simple door knocking animation. To activate this animation, there will be a proximity prompt at the door. When the player holds down “E” to interact with the door, I want the player who interacted with the prompt to stop moving and play the animation. After this short animation, the player will be unfrozen and can continue walking. I have looked around the forum, and I have not seen anything about playing a character anim after a proximity prompt is finished.

Thank you in advance,
Mustang

There are events called PromptButtonHoldBegan which fired when a player starts to trigger the proximity prompt and PromptButtonHoldEnded which fired when a player stops triggering it.

Does “promptbuttonholdended” get the exact player who used the prompt?

I have figured it out. It turns out that what I was wanting was the “PromptTriggered” event.

https://developer.roblox.com/en-us/api-reference/event/ProximityPromptService/PromptTriggered

You should use the prompt’s Triggered event if you want to execute code when the prompt is triggered.

1 Like