Advertisement
PC55654

Rejoin Script

Dec 11th, 2024
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | Source Code | 0 0
  1. local TeleportService = game:GetService("TeleportService")
  2. local player = game.Players.LocalPlayer
  3. local placeId = game.PlaceId -- The current game's PlaceId
  4. local buttonGui
  5.  
  6.     -- Attempt to teleport the player to a random server in the same game
  7.     local success, errorMessage = pcall(function()
  8.         TeleportService:Teleport(placeId, player)
  9.     end)
  10.  
  11.     if not success then
  12.         warn("Teleport failed: " .. errorMessage)
  13.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement