I am making an NPC that teleports you to a place through a dialog, but the dialog option is not doing anything. Help would be appreciated.
local teleport = game:GetService("TeleportService")
script.Parent.DialogChoiceSelected:Connect(function(player,dialog)
if dialog.Name == "choice1" then
print("print")
local id = -- game id --
wait(3)
teleport:Teleport(id, player)
print("teleported")
end
end)
It doesn't even print "print"

2 comments
Dialogs and teleportation services don’t work in studio
even outside of studio it doesn't work