How do I get the player who interacted with Proximity Prompt

Hello,
Im trying to make a pet hatching system. Currently I have used a ClickDetector to find out who clicked so I can add the pet to that player’s Inventory that way.
I just found out what a Proximity Prompt is, and wanted to know if there is a way to find out who clicked the Prompt.

Funny enough, the ProximityPrompt’s Triggered Event (Which fires when someone interacts with the prompt) tells you the Player who exactly fired it! It kinda works the same way as the ClickDetector’s MouseClick Event

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

local Prompt = script.Parent.ProximityPrompt

Prompt.Triggered:Connect(function(Plr)
    print(Plr, "has pressed this prompt")
end)
2 Likes

Ohh, I didnt know that! Thank you