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
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.