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

Double NPC message using Dialog?

Asked by 5 years ago
Edited 5 years ago

I have a dialog for an NPC representing a trader. Here is the current conversation:

-Player Clicks "?" and starts conversation

-Trader: Hello! I have a deal!

-Player: Ok What Is It?

-Trader: Checking... Found

Now at this point, a remote event was fired when the conversation started and the serverscript has readied the next quest.

My question is how to make the trader talk again, right after he says "Checking... Found", without another response from the player. In other words he talks twice before the conversation ends.

EDITED PART

Image Of Current Dialog Hierarchy: https://gyazo.com/5ab72f2b3c5a851af788381fd93650b0

Gif of current Conversation: https://gyazo.com/f3655e634051501b3ebe39e41877808d

As you can see I need him to talk a Second time to actually tell the quest.

SCRIPTS

LocalScript In StarterPlayerScripts

local remote = game.ReplicatedStorage:WaitForChild("GetQuest")
game.Workspace.Trader.Head.ScanCurrent.DialogChoiceSelected:Connect(function(plr, choice)
    if choice.Name == "Accept" then --if player clicks accept
        remote:FireServer() --sends message to fetch current quest
    end
end)

ServerScript in ServerScriptService

game.ReplicatedStorage:WaitForChild("GetQuest").OnServerEvent:Connect(function(player, DialogToChange)
    local quest = player:WaitForChild("Leaderstats"):WaitForChild("Quest")
    local message = script:WaitForChild("Quests"):FindFirstChild(quest.Value)--looks in the quest folder and checks for the quest based on the users quest value
    if message then
        --have the message but not sure how to relay it through the trader
    else
        print("no mess")
    end
end)

Any ideas? Thanks for any help!

0
Put the NPC script and remote event script here to provide more detail. CaptainD_veloper 290 — 5y
0
Give me a min to edit the post with images KamikazeJAM108867 38 — 5y
0
Updated, if you need anything else, ask KamikazeJAM108867 38 — 5y
0
Just have the player choose between continuing or exiting out of the dialog. This is where making a custom communication would help but you can stick with Dialog objects. xPolarium 1388 — 5y

Answer this question