Hello All,
Essentially, I have a list of parts that’s created at the start of the script, called ‘Fronts’.
Every 10th of a second, we need to send the CFrames of all of these parts to the server.
At the moment the code to get those looks like this:
local CFrames = {}
for i,v in ipairs(Fronts) do
table.insert(CFrames,v.CFrame)
end
But this looks rather messy!
In python it is possible to use a list contraction, and the code would look something like this:
CFrames = [v.CFrame for v in Fronts]
This looks much neater to write and use!
If this exists in Lua, please let me know how to do it. It would really clean up my code.
Thanks!