I'm trying to teleport everyone in a server to someone else's server in a different game. Easy enough. Except it's not, since it's returning some crap about the user being offline, when they're CLEARLY not.
local teleportService = game:GetService'TeleportService'
local teleportin = false
function check(ayy)
local success,errorMsg,placeId,instanceId = teleportService:GetPlayerPlaceInstanceAsync(ayy)
end
function checkifgood(arg)
local suc,msg = nil,nil
local coru = coroutine.wrap(function()
suc,msg = pcall(check(arg))
end)
if suc then
return true
else
return false
end
end
function followPlayer(player, targetUserId)
local success2,errorMsg,placeId,instanceId = teleportService:GetPlayerPlaceInstanceAsync(targetUserId)
if success2 then
teleportService:TeleportToPlaceInstance(placeId, instanceId, player)
else
followPlayer(player,targetUserId)
end
end
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if string.sub(string.lower(msg),1,8) == "teleport" and plr:GetRankInGroup(3288652) == 254 and plr:GetRankInGroup(3288652) ~= 255 and teleportin == false then
game:GetService('TeleportService'):Teleport(string.sub(msg,10,string.len(msg)), plr)
local teleporting = plr.UserId
local aaaa = plr.Name
teleportin = true
repeat wait() until game.Players:FindFirstChild(aaaa) == nil and checkifgood(teleporting) == true
for i,v in pairs(game.Players:GetChildren()) do
followPlayer(v,teleporting)
end
end
end)
end)
This is the error message:
HTTP 0 (HTTP 400 (HTTP/1.1 400 UserOffline))

3 comments
Did you define
userIdHere? OrteleportService?Yes, I defined both. (just edited it for the purpose of simplicity)
AHA I see game:GetService("TeleportService") and HTTP 0 (HTTP 400 (HTTP/1.1 400 UserOffline)) means when the player is offline... if your game you are linking to is correct, remember to add it to edit game..