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

How do I make dialogue different each time/after I talk to somebody?

Asked by 2 years ago

I'm not using any script for this im just using the default roblox dialogue system so I probably have to change it but I can not find any tutorial for it and I really need help doing it

If it helps heres my game: https://www.roblox.com/games/8530716812/Talking-Brick

1 answer

Log in to vote
0
Answered by
AronYstad 101
2 years ago

You can use DialogChoiceSelected like this:

dialog.DialogChoiceSelected:Connect(function(player, choice)
    if choice == lastChoice then
        --put code to swap dialog here
    end
end)

where dialog is the dialog instance and lastChoice is the DialogChoice instance that triggers the swap.

This only works in a LocalScript and does not fire when you select the goodbye choice, so you would need to make a custom goodbye choice for that.

0
Could you tell me it more in depth like how i get the variable for lastChoice Omgcat1111 12 — 2y
0
and do i put it on Starterkit or the brick itself Omgcat1111 12 — 2y
0
lastChoice is just the DialogChoice that you want it to end with and trigger the swap, for example game.Workspace.TalkingBrick.Dialog.DialogChoice. Basically, it's the point in the dialog tree that you decide, where it makes it give you another dialog next time. AronYstad 101 — 2y
0
And since it needs to be in a LocalScript, put it in StarterPlayerScripts or StarterGui or something like that. You could connect it to a RemoteEvent if you want it to change the dialog for everyone in the server. AronYstad 101 — 2y
Ad

Answer this question