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

How would I make a dialogue option teleport a player? [Solved]

Asked by 10 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

Literally no clue as to how I can do this, any help?

2 answers

Log in to vote
1
Answered by
Sublimus 992 Moderation Voter
10 years ago

You must insert a script into the Dialogue object, not the Dialogue Option object, but the Dialogue object. It will read the dialogue choice's click and execute code.

script.Parent.DialogChoiceSelected:connect(function(player, choice)
    if (choice == script.Parent.Choice1) then --Change 'Choice1' to the name of the choice that teleports the player
        player.Character:MoveTo(Vector3.new(0,0,0)) -- Change the (0,0,0) to the correct position
    end
end)
0
Cool, thanks very much. lizard9372 5 — 10y
0
Be sure to up-vote people who answer your questions correctly! Sublimus 992 — 10y
0
I would if I could, but I can't because people downvoted my question so that my reputation is -1..... lizard9372 5 — 10y
Ad
Log in to vote
-1
Answered by
Sakuzo 5
9 years ago

Ahahaha, it's funny how SH allows this guy to ask the question but not me. https://scriptinghelpers.org/questions/3822/how-you-make-a-script-that-teleports-you-to-somewhere-when-you-speak-to-an-npc

Answer this question