I’m trying to make a matchmaking system, wherein once the player touched the handler part, a intValue is created in a folder representing the matchmaking, upon the max player counter is met, an attempt at teleporting will occur, this is where my problem starts, I don’t really know what’s wrong here. I’ve tried a lot of things, but its too many for me to name.
Problematic Code:
local plrs = { }
for int, found in game.ServerStorage.Queues:FindFirstChild(v.Name):GetChildren() do
plrs[int] = found.Value
end
local tpService = game:GetService("TeleportService")
local reserveServer = tpService:ReserveServer(15852072777)
tpService:Teleport(reserveServer, plrs)
I believe this is the problem. I assume that found.Value is a string, not a player instance. If my assumption is right, then you need to store the player instance onto the table, not the string, because the Teleport method from TeleportService needs to have a player instance, not a string. Also, I don’t think the table would work.
If you look at his image, found is an ObjectValue pointing to (presumably) Vlad’s Player object.
There are definitely better ways of creating that Table, but it’s not invalid.