Heya! So, I am making a main menu UI, witch when you press a TextButton, you should be teleported to another game, where the player could start playing in-game. Here’s the script I’ve made and the explorer screenshot too:
local teleportButton = script.Parent
local function teleportPlayer()
local player = game.Players.LocalPlayer
player:LoadCharacter()
game:GetService("TeleportService"):Teleport(player, 123456789) -- I've set here for showing script a sample universe ID.
end
teleportButton.MouseButton1Click:Connect(teleportPlayer)
Here’s the explorer screenshot:
“play” is the TextButton, & the inside Local Script is where I’ve made the script for the teleporter, but didn’t work. I would really apreciate if someone could help me on this!