Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

getting player from proximity prompt?

how would you get the name of the player who triggered the proximity prompt

1 answer

Taken directly from the ProximityPrompt API page:

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

For more information on the Triggered event, visit this link

To get the name of the player, use:

player.Name

4 comments

0

Ayo don't act all smug taken directly from proximity prompt api page i alr used that script i asked how to get the player who triggered it

0

@cookiethesoda What do mean exacly?

0

@cookiethesoda The player object?

1

The player object (the player who triggered it) is given from the event. The player object from the 'Triggered' event is the only argument in the function.

This discussion is preserved as it was. New answers, comments, and votes are closed.