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

Quest System With Roblox Dialog?

Asked by 4 years ago
Edited 4 years ago
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 answer

Log in to vote
0
Answered by 3 years ago

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!

Ad

Answer this question