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

Is it Possible to Trigger a Function when DialogChoice is selected via LocalScript?

Asked by
AAzterr 27
5 years ago

Title says it. Is there a way to trigger a function when a certain DialogChoice is selected with a LocalScript?

1 answer

Log in to vote
0
Answered by
Miniller 562 Moderation Voter
5 years ago
Edited 5 years ago

I think yes, put a local script into startercharacterscripts. This is an example:

workspace.Dialog.Head.Dialog.DialogChoiceSelected:Connect(function(player, dialog)
    print(dialog.Name .." ".. player.Name) -- dialog.Name prints Choice1 for me, because that's the name of the choice, and player prints the player's name who clicked
    --I was just show the arguments, of course you can write your code there, or FireServer from there.
end)

Possible with Remote Events too..

1
thank you, worked AAzterr 27 — 5y
Ad

Answer this question