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

How to get player from triggering proximity prompt?

I don't want to get the player name. I want to get like the player model [from workspace] (humanoid, body parts and stuff). How do I do that?

1 answer

✓ Accepted answer

the model with the humanoid would be their character.

local proximityprompt = script.Parent -- may need to edit this depending on the location of your script
proximityprompt.Triggered:Connect(function(player) -- gives player object, not their name
	assert(player.Character, "character is missing")
	local character = player.Character -- this would be what you're looking for
end)

you can use this if you're stuck on something

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

1 comment

0

Learn how to make clickable links, for example; [Google!](https://google.com)

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