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

how to detect when a player answers an answer with dialog?

so i am using dialog to have a talk between the player and a pirate so i need to know when a player says a certain answer how do you detect when a player says it?

edit: ok guys so you want to make a local script and put it in starter pack make sure it is local then the script inside of it is

local dialog = game.Workspace.Model1.model.Head.Dialog
dialog.DialogChoiceSelected:Connect(function(player, choice)
	local plr = game.Workspace:FindFirstChild(player.Name)
	if plr then
		if choice == dialog.DialogChoice.DialogChoice1 then -- make it be the choice you want
			--ENTER THE CODE YOU WANT IT TO RUN HERE
		end
	end
end)

6 comments

0

Idk

0

lol why did you say that???

0

Scripting helpers is not a request site.

0

No I just want to know how to do a single line of code not like a whole script

0

I just want to know how to detect when a player does a certain answer

0

Ah, right. Simply just find that if TextBox has "ANSWER" then do following. if script.Parent.Text = "Your exact answer here" then

1 answer

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