Hey guys, I’ve been looking up this error " 18:50:08.168 - Game:CreatePlace received and error: HTTP 0 (HTTP 403)." and have tried what people have suggested (like moving the models i made to my group and making them public) but the game still wont let me teleport.
This is where the Error is and this is players teleporting to the arena not after. So I don’t if there is going to be another error teleporting back to the lobby:
local arenaPlaceId = game:GetService("AssetService"):CreatePlaceAsync(
"Arena place for " .. playerA.Name .. " and " .. playerB.Name, arenaPlaceTemplateId)
-- Bind OnTeleport event to playerA (who is teleported first). If that teleport is successful
-- then we want playerB to be teleported to the same instance
local connection = playerA.OnTeleport:connect(function(teleportState, placeId)
if teleportState == Enum.TeleportState.Started then
local teleportStarted = os.time()
-- Keep checking if playerA has arrived in other instance.
while true do
local success, error, placeId, arenaInstanceId = teleportService:GetPlayerPlaceInstanceAsync(playerAId)
-- If playerA is in the correct place then we can teleport playerB there as well
if placeId == arenaPlaceId then
teleportService:TeleportToPlaceInstance(arenaPlaceId,playerB)
return
end
wait()
end
end
end)
wait(1)
-- Teleport playerA to the arena
teleportService:Teleport(arenaPlaceId, playerA)
end
-- Matchmaking loop. Cycles about every 5 seconds to match players.
while true do
local now = os.time()
-- Cycle through queue, try to find players in range
for _, mmData in pairs(matchMakingQueue) do
print("attempting to find match for " .. mmData.UserId)
-- Get rank range to search
local range = getRange(now - mmData.EnteredQueue)
-- Use list to find a player in player's rank range
local otherPlayerId = rankedList:FindPlayerInRange(mmData.UserId, range)
if otherPlayerId then
-- Another player was found. Remove both players from the queue and list so they
-- can't be matched with anyone else
print("found player: " .. otherPlayerId)
rankedList:RemovePlayer(mmData.UserId)
rankedList:RemovePlayer(otherPlayerId)
removeFromMMQueue(mmData.UserId)
removeFromMMQueue(otherPlayerId)
-- Start game with the two players. This function can take some times, so start a
-- coroutine so the loop can continue.
local thread = coroutine.create(function() startGame(mmData.UserId, otherPlayerId) end)
coroutine.resume(thread)
I have been looking at the wiki and following along their matchmaking guide as well