Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to teleport between places?

So I was trying to create a place teleporter in a GUI. I used this but it doesn't seem to work:

 script.Parent.MouseButton1Click:connect(function()

wait(6)

game:GetService("TeleportService"):Teleport(3194743457)

end)

I would like to keep it in a TextButton

2 comments

0

You need to put in the player you are teleporting in the parameters for Teleport

0

But I want it to be the local player

2 answers

In A Local Script Put This:

local player = game:GetService("Players").LocalPlayer

local TeleportService = game:GetService("TeleportService")

local ReplicatedStorage = game:GetService("ReplicatedStorage")

  

script.Parent.MouseButton1Down:Connect(function()

wait(2)

TeleportService:SetTeleportGui(ReplicatedStorage:FindFirstChild("TeleportGUI"))

TeleportService:Teleport(PLACEID, player)

end)

This discussion is preserved as it was. New answers, comments, and votes are closed.