Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I convert CFrame into CSV?

Tables doesn't seem to work, because of userdata. Is there a way to convert a CFrame into a CSV string?

1 answer

✓ Accepted answer

There may be better ways, but you can just do it manually like so:

local cframe = 'Your CFrame here'
local componentTable = { cframe:GetComponents() }
local csvString = ""
for i = 1, #componentTable do
	-- Only add a comma after the value if it isn't the last one
	 csvString = csvString .. tostring(componentTable[i]) .. (i < #componentTable and ", " or "")
end

This discussion is preserved as it was. New answers, comments, and votes are closed.