How do i make a dialog that teleports player to other place?

I have a problem, if player selects “111” dialogchoice it doesn’t teleport player to other place.
изображение_2022-02-13_115139

function check(Player,DialogChoice)
	if DialogChoice.Name == "111" then
		wait(1)
		game:GetService("TeleportService"):Teleport(8805414797,Player)
	end
end

script.Parent.DialogChoiceSelected:connect(check)
4 Likes

Make sure, that you are using a Local Script inside StarterPlayerScripts to Teleport. Also you misspelled “connect”, it should be “Connect”.

3 Likes

“:connect()” works, it’s just the deprecated alternative.

4 Likes

Thanks, i will try this and see if it works

1 Like

It is not teleporting me
image

image

function check(Player,DialogChoice)
if DialogChoice.Name == “111” then
game:GetService(“TeleportService”):Teleport(8805414797,Player)
end
end

script.Parent.DialogChoiceSelected:Connect(check)

1 Like

You have the wrong path for your NPC.

1 Like

image
Did i do everything right?
function check(Player,DialogChoice)
if DialogChoice.Name == “dia” then
game:GetService(“TeleportService”):Teleport(8805414797,Player)
end
end

workspace.V.Head1.Dialog.dia.DialogChoiceSelected:Connect(check)

Everything is fine, except you should select your Dialog, not the answer, so it should be:

game.Workspace.V.Head1.Dialog.DialogChoiceSelected:Connect(check)

Thank you!!! it is working :grin:
Now my game have working npc teleport

1 Like