dumpToFile lets you use dump to write a file.
-- @/lua/common/utils.lua:879
--MARK: IO helpers
-- inspects the arguments and writes the output to the file
function dumpToFile(filename, ...)
local f = io.open(filename, "w")
if f then
f:write(inspect(...))
f:close()
return true
end
return false
end
local damageData = getPartDamageData()
dumpToFile("partDamage.json", damageData)
end