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

How do use the Dialog.DialogChoiceSelected?

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

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

Dialog.DialogChoiceSelected:Connect(
    function(player, dialogChoice)
	    -- code to be executed
    end
)

2 comments

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".

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. :(

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