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
Idk
lol why did you say that???
Scripting helpers is not a request site.
No I just want to know how to do a single line of code not like a whole script
I just want to know how to detect when a player does a certain answer
Ah, right. Simply just find that if TextBox has "ANSWER" then do following. if script.Parent.Text = "Your exact answer here" then