Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Quest System With Roblox Dialog?

script.Parent.DialogChoiceSelected:connect(function(player, Dialog)
	if Dialog.Name == 'Dialog1' then
		game.StarterGui.Quests.QuestsText.Text = "Test"
		
	end
end)

So I am trying to make a quest system out of normal dialog (This script is the child of my dialog). I want it to make it so when you talk to the npc it makes the text of a quest gui switch from Quest: None to Test it dosent work any help?

Edit:

local plr = game.Players.LocalPlayer
		local starterGui = plr:WaitForChild("PlayerGui")
script.Parent.DialogChoiceSelected:connect(function(player, Dialog)
		if Dialog.Name == 'Dialog1' then
			starterGui.Quests.QuestsText.Text = "Test"
			
		end
	end)	

my new script on a local one and it still doesnt work ;/

ANSWERED: Answered my own question lol did some research local script doesn't run in a dialog so I moved it to starter gui and did this

local starterGui = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui')
game.Workspace["SDMittensFan223/Dev"].Head.Dialog.DialogChoiceSelected:connect(function(player, Dialog)
        if Dialog.Name == 'Dialog1' then
            starterGui.Quests.QuestsText.Text = 'Test'

        end
    end)    

SDMittensFann23/Dev is my quest giver ;) thanks to the person who helped me with some research!

1 comment

1 answer

ANSWERED: Answered my own question lol did some research local script doesn't run in a dialog so I moved it to starter gui and did this


	local starterGui = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui')
	game.Workspace["SDMittensFan223/Dev"].Head.Dialog.DialogChoiceSelected:connect(function(player, Dialog)
	        if Dialog.Name == 'Dialog1' then
	            starterGui.Quests.QuestsText.Text = 'Test'
	 
	        end
	    end)

SDMittensFann23/Dev is my quest giver ;) thanks to the person who helped me with some research!

This discussion is preserved as it was. New answers, comments, and votes are closed.