Best way to make a Dialogue System

Is there any way to make a dialogue system with modulescripts and options, like for example
I hold E on a quest npc, it requires the dialogue modulescript and finds the actual dialogue modulescript inside it like this: image
and then it’ll return the things the NPC will say, the button options to respond like: “hello.”, “ok.”, “e.”
and such and then the dialogue gui will open in the player that activated the proximityprompt’s playerguis
and finally the quest npc talks and it includes the option buttons.
Something like this maybe?

local dialogue = {
	-- the dialogue will be here and depends on what option the player clicks on, if it's the first one then it will say "Joe Dada" and second one like "Thanks!" and stuff
}

local options = {
	"Joe who?",
	"Hi joe that's cool",
	"Joe Mama is very cool"
}
1 Like

Roblox has a nice tutorial on creating a dialogue tree you can look at here:

That’s great but how would I do it with a proximity prompt serverscript and then do the dialogue in a localscript?

RemoteEvents and RemoteFunctions can both be used to facilitate the communication and thus exchanging of data/information between local scripts and server scripts and vice versa.

You will likely want to make use of the former.