I have a multi-place game and want it so you can teleport between places. Right now I use a basic teleportation system and it doesn't work half the time and takes a lot of time when it does. Is there anything to change or to improve on?
local Teleport = game:GetService("TeleportService") Teleport:Teleport(ThePlaceId, plr)
This is the teleportation part of the script and the script fires when the player touches a part. The function fires and it makes a teleport GUI open on touch, but the teleportation does not work.
Any help is very useful, thanks!
There is a script for this by Roblox but here it is!
local Players = game:GetService("Players")
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
local placeId = 0 -- replace here
local loadingGui = ReplicatedStorage:FindFirstChild("LoadingGui") -- replace here
-- parent the loading gui for this place
loadingGui.Parent = playerGui
-- set the loading gui for the destination place
TeleportService:SetTeleportGui(loadingGui)
-- teleport the user