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

How do I enable a disabled script in Workspace via Dialog choices?

Asked by 5 years ago
Edited 5 years ago

Pls help I'm new to scripting. This is the script i put in the Dialog and it doesnt work

local dialog = script.Parent
local activateScript = game.Workspace.["MyDisabledScript"] --Name of your script


dialog.DialogChoiceSelected:connect(function(player, choice) --This is for getting the service when the choice is selected
    if choice == script.Parent.DialogChoice.ChoiceA then --Choice A is what you named the option in studio
        --Do what you want to do
        activateScript.Disabled = false --Activated Script


    elseif choice = script.Parent.DialogChoice.ChoiceB then
       --Do what you want
    end
    --Repeat for all choices
end)
0
dialog choices must be local; also, use a remote event/function DeceptiveCaster 3761 — 5y

1 answer

Log in to vote
0
Answered by
royaltoe 5144 Moderation Voter Community Moderator
5 years ago

Is it in a local script? DialogChoiceSelected needs to be in a localscript.

Ad

Answer this question