So I'm making a game, and inside it after you are done talking to someone (with dialog) 5 seconds after talking it will teleport them to a different game. Could anyone try to give me a script for it?
✓ ANSWER ACCEPTED
How to teleport to places after finished talking to NPC?
1 answer
✓ Accepted answer
Tested this out and it will work! This script should go into ServerScriptService or Workspace.
local guy = game.Workspace:WaitForChild("Person Name") --Works with humanoids with the name.
local dialog = guy:WaitForChild("Head"):WaitForChild("Dialog")
local id = --Place ID
dialog.DialogChoiceSelected:connect(function (player,selection)
wait(1)
if selection.Name == "Dialog Name" then --This checks for if the player clicks the DialogChoice named "Dialog Name"
game:GetService("TeleportService"):Teleport(id)
dialog.Parent = nil
else
--Other Dialog that is not that option. (optional)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Do you have your Dialog script made? If so, post it here.