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

How do use the Dialog.DialogChoiceSelected?

Asked by 5 years ago

I dont know where and how in the script I should use it and how does it know which dialog choice is selected. I've tried using it in an if statement but it does not work. Btw i'm new to lua!

1 answer

Log in to vote
0
Answered by 5 years ago

Like all events, you connect a function to it like so:

Dialog.DialogChoiceSelected:Connect(
    function(player, dialogChoice)
        -- code to be executed
    end
)
0
That won't work if he is trying to teleport to another game. Also, your parentheses are a bit odd, as line 4 should be "end)" and not "end". DeceptiveCaster 3761 — 5y
0
sorry im just a big noob! at lua would be nice if I could use another language that I know but I don't think I can. :( ra1nb0wp0n1 2 — 5y
Ad

Answer this question