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

How to get player from dialog?

I'd like to get the player who clicked on the dialog initially. I was thinking of using DialogChoiceSelected, but it turns out that only activates when a choice of the dialog gets clicked on. I'd like to find some way to get the player when the player just clicks on the dialog initially, before choosing anything. Any ideas?

1 comment

0

Sorry, there is none. You can only see if someone is chatting with the dialog, you can't find the player itself though.

1 answer

There's no way to get the player initially.. you're better off using a DialogChoice


The DialogChoiceSelected Event returns two things

  • The player that chose
  • The choice

Image

Just make a parameter for the player and use it(:


Code

script.Parent.DialogChoiceSelected:connect(function(plr,choice)
	print(plr.Name..' chose: '..choice.Name)
end

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