Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TeleportService = game:GetService("TeleportService")
- local player = game.Players.LocalPlayer
- local placeId = game.PlaceId -- The current game's PlaceId
- local buttonGui
- -- Attempt to teleport the player to a random server in the same game
- local success, errorMessage = pcall(function()
- TeleportService:Teleport(placeId, player)
- end)
- if not success then
- warn("Teleport failed: " .. errorMessage)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement