Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to script a dialog?

Asked by 10 years ago

I want me too know if I can script a dialog so when the player chooses a sertain reply something happens.

3 answers

Log in to vote
2
Answered by
trogyssy 221 Moderation Voter
10 years ago

Put this under the DialogChoice:

script.Parent.DialogChoiceSelected:connect(function() 
--script here
end)
1
Okay i'll try it. masterhalo55 75 — 10y
Ad
Log in to vote
0
Answered by 5 years ago

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)
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 User#27824 0 — 5y
Log in to vote
0
Answered by 5 years ago

To create a NPC that a player can talk to is very simple:

  1. Choose the NPC you want to have dialog
  2. Right-Click "Head"
  3. Click insert object
  4. Choose Dialog
  5. Open properties and choose the initial prompt
  6. Right-Click "Dialog"
  7. Insert Dialog Choice to the dialog
  8. 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!

Answer this question