I’m working on a game right now that saves player data, and I’ve added a button to reset their data that’s supposed to rejoin them as well.
My problem is that my game has 0 players, so when I try to rejoin myself using TeleportService:Teleport() or TeleportService:TeleportAsync(), it sends me to the same server–which is now shutting down. It also gives me an error message that says “This place has shut down”
I’d prefer not to use ReserveServer since that could take longer on slower connections like mine lol. these are the two methods I’ve tried so far ^^
first attempt -
local teleportOpt;
if #players:GetPlayers() > 1 then
teleportOpt = Instance.new("TeleportOptions")
teleportOpt.ServerInstanceId = game.JobId
end
game:GetService("TeleportService"):TeleportAsync(game.PlaceId, {plr}, teleportOpt)
second attempt -
if #players:GetPlayers() > 1 then
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId, plr)
else
game:GetService("TeleportService"):Teleport(game.PlaceId, plr)
end