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

Why won't this dialog appear?

Asked by
yoshi8080 445 Moderation Voter
8 years ago

I was trying to do was, when a player clicks on a choice, a dialog will appear on another brick. it won't pop up on the required brick help?

local part = game.Workspace.Bricks

script.Parent.DialogChoiceSelected:connect(function(player, choice)
    if (choice == script.Parent["Choice1"] then
        local new = Instance.new('Dialog',part)
        new.InitialPrompt = 'Hello!'
    end
    if (choice == script.Parent["Choice2"] then
        local new = Instance.new('Dialog',part)
        new.InitialPrompt = 'Hola!'
end
    if (choice == script.Parent["Choice3"] then
        local new = Instance.new('Dialog',part)
        new.InitialPrompt = 'Hi!'

    end
    end)

1 answer

Log in to vote
0
Answered by 8 years ago

You don't NEED to use a script for this. I found this extra helpful ROBLOX wiki article for dialog. And, if you must use scripts for dialog, the article covers it as well. http://wiki.roblox.com/index.php?title=How_to_use_Dialog

0
Yea, I read it and, I didn't find what I was looking for... And I think it needs a script for it anyways. yoshi8080 445 — 8y
0
BTW, use a "local" in the first line. Also, try doing this for all the ifs: if (choice == script.Parent["Choice1"] then since you have a number in there fight4moneyalt2 27 — 8y
Ad

Answer this question