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

How use dialog to teleport to other places?

Asked by 5 years ago

I have tried many times to have a dialog teleport you to a whole different place.

function check(Player, Choice) if Choice.Name == "Choice1" then --The Name of The Dialog Choice Goes Here local TeleportService = game.GetService("TeleportService") local Place = 2033670330

script.Parent.DialogChoiceSelected:Connect(check)

script.Parent.MouseButton1Click:Connect(function() TeleportService:Teleport(Place, Player) end) end end

This is my final script that I used and I still can't figure it out. Help would be appreciated, what is wrong with this?

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

The Dialog class has no MouseButton1Click event.

local TeleportService = game.GetService("TeleportService") 
local Place = 2033670330

local function check(plr, dialog)
    if dialog.Name == "Choice1" then
        TeleportService:Teleport(Place, plr)
    end
end

script.Parent.DialogChoiceSelected:Connect(check)

Make sure this is a server script to work.

Ad

Answer this question