I've been working a tower defense game in Roblox, and I have been trying to add a teleport system, but I get the error (unable to cast array to int64) in the output. The script is to reserve the server, and teleport the players to that private server.
Here's the code:
local MapCollection = {4895754098}
local MapID = MapCollection
function onTouched(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local access = game:GetService("TeleportService"):ReserveServer(MapID)
game:GetService("TeleportService"):TeleportToPrivateServer(MapID,access,{player})
end
script.Parent.Touched:connect(onTouched)
I would like a reply so I can fix the script as soon as possible.
Thanks, notreallysupernova

3 comments
If this answer helped you, please mark it as correct.
it didn't work I got a error HTTP 404 (Forbidden) :(
I gives me a error saying HTTP 404 (BadRequest)