My plan here was to collect data [ a group of values within a folder ], and store them within a Dictionary [ All_Info ], under a unique key [ the player’s name ], but at the moment everybody is entering the game with the same data. Am I not saving each new table of data as a unique key correctly?
I’ve struggled with this script for the past couple hours, and am not sure if the error lies within this script or where I load the data. Does it look like I’m doing this correctly?
The Code
local function TeleportPlayers()
local code = TeleportService:ReserveServer(6966556201)
local Players_Table = {}
local Player_Info = {
["Pet"] = nil,
["Mod"] = nil,
["Passive"] = nil
}
local All_Info = {}
for i, player in pairs(Players_Folder:GetChildren()) do
local Player = game.Players:FindFirstChild(player.Name)
table.insert(Players_Table, Player)
local Players_Info = Player:FindFirstChild("Player Info"):GetChildren()
if Players_Info then
for i, data in pairs(Players_Info) do
if data and data.Value ~= nil then
Player_Info[tostring(data)] = tostring(data.Value)
end
end
All_Info[Player] = Player_Info
end
end
TeleportService:TeleportToPrivateServer(6966556201, code, Players_Table, nil, All_Info, nil)
end