I’m trying to add a table with a variable dependent name, but the table keeps getting overwritten.
Code:
local ServerPlacementData = {}
function ServerHouseCreatorHandler:CreatePart(ClientData,PartData)
local PartIdentifier = HttpService:GenerateGUID(false)
ServerPlacementData[ClientData] = {["PlacedParts"] = {}}
ServerPlacementData[ClientData].PlacedParts[PartIdentifier] = {PartData[1],PartData[2],PartData[3],PartData[4],PartData[5]}
end
Result is that the created table (PartIdentifier) will keep on getting overwritten as the function keeps on being used.
I’m trying to achieve something like this:
local ServerPlacementData = {
["39520489"] = {
["1B1B424B-ACBF-4C4F-8BEE-DADFE80E1EED"] = {
PartData[1],PartData[2],PartData[3],PartData[4],PartData[5]
}
}
}