Unimportant.
“Body too similar to what you recently posted” because I accidentally posted this in another category. What do you expect me to do now?
Hello! I’m to store all X,Y and Z axis positions of multiple parts in separate tables. To do this neatly, I was thinking about calling the same function 3 times while telling the function which axis to extract. Not sure on how to do it, though. This is what I came up with and… it doesn’t work. Not that surprised.
local function sortPartPositions(Parts, typeOfCoord)
local PartPositions = {}
for _,v in pairs(Parts) do
table.insert(PartPositions, v.Position.typeOfCoord)
end
return PartPositions
end
local Xtable, Ytable, Ztable = sortPartPositions(Parts, X), sortPartPositions(Parts, Y), sortPartPositions(Parts, Z)
Error is
typeOfCoord is not a valid member of Vector3
Any help? Thanks in advance!