I'm making a place that's like the future of Roblox and I want to make a futuristic teleport. But it won't teleport. Here's my code: Remember, I copied it from the Wiki.
ame:GetService("TeleportService").CustomizedTeleportUI = true
local teleportService = game:GetService("TeleportService")
local otherPlaceId = 101923636 -- this is the place ID i want them to teleport to.
local button = script.Parent
local loadingScreen = script.Parent.Parent
button.MouseButton1Click:connect(function()
game:GetService("TeleportService"):Teleport(otherPlaceId)
loadingScreen.Visible = true
for i = 1, 0, -.05 do
loadingScreen.BackgroundTransparency = i
wait()
end
loadingScreen.BackgroundTransparency = 0
end)
game.ReplicatedStorage.TeleportRequestEvent.OnServerEvent:connect(function(player)
local character = player.Character
local forceField = Instance.new("ForceField", character)
player.OnTeleport:connect(function(teleportState)
if teleportState == Enum.TeleportState.Failed then -- teleport to game not working
game.ReplicatedStorage.TeleportRequestEvent:FireClient(player)
forceField:Destroy()
end
end)
teleportService:Teleport(otherPlaceId, player) -- do I need this? I copied it from Wiki.
end)
I copied this from the Wiki so it may need some changes. Thanks for reading!

1 comment
thanks so much! I'm a begginer scripter and I really don't know much about teleportation and big stuff. but thanks!