Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

UserOffline, Any help with matchmaking problems?

Asked by 7 years ago

I'm using roblox's matchmaking scripts to create my own parties, but when the game starts only the owner is teleported. Then there is an error message saying UserOffline. I don't get why this helps any help?

local arenaPlaceId = game:GetService("AssetService"):CreatePlaceAsync(server.Map.Value..": "..play1, arenaPlaceTemplateId)

    local ownerid = game.Players:FindFirstChild(play1).userId
    if play2 == nil and play3 == nil and play4 == nil then
    else
        local connection = game.Players:FindFirstChild(play1).OnTeleport:connect(function(teleportState, placeId)
            if teleportState == Enum.TeleportState.Started then
                local teleportStarted = os.time()
                for i=1,3 do
                    local playz = nil
                    if i == 1 then
                        playz = play2
                    elseif i == 2 then
                        playz = play3
                    elseif i == 3 then
                        playz = play4
                    end
                    if playz == nil then
                        break
                    end
                    while true do
                        local success, error, placeId, arenaInstanceId = teleportService:GetPlayerPlaceInstanceAsync(ownerid)
                        if placeId == arenaPlaceId then
                            teleportService:TeleportToPlaceInstance(arenaPlaceId, arenaInstanceId, game.Players:FindFirstChild(playz))
                            return
                        end
                        wait()
                    end 
                end
            end
        end)
    end
    wait(1)

    teleportService:Teleport(arenaPlaceId, game.Players:FindFirstChild(play1))

Every variable is defined and this is part of a script.

Answer this question