I want me too know if I can script a dialog so when the player chooses a sertain reply something happens.
✓ ANSWER ACCEPTED
How to script a dialog?
3 answers
✓ Accepted answer
Put this under the DialogChoice:
script.Parent.DialogChoiceSelected:connect(function()
--script here
end)
why do it not work. workspace -> npc -> head -> dialog -> script
local Box = game.ReplicatedStorage.Stuff.Box
script.Parent.DialogChoiceSelected:Connect(function(player, Choise)
if Choise == script.Parent.DeliverBoxes then
local Part = Box:Clone()
Part.Parent = player.Backpack
end
end)
1 comment
0
i put it in local script but it wont work. like he dont see i click on the button so he can do this
To create a NPC that a player can talk to is very simple:
- Choose the NPC you want to have dialog
- Right-Click "Head"
- Click insert object
- Choose Dialog
- Open properties and choose the initial prompt
- Right-Click "Dialog"
- Insert Dialog Choice to the dialog
- Choose what it will say and choose the response dialog
You probably get the point. You can also insert Dialog Choice to Dialog Choice to make that chat much longer!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Okay i'll try it.