WriteCompressed()

Reads a file of a given name and returns a string of the contents.
File.Write(filename, contents)

Arguments:

  1. string filename - The name of the file to write and compress. You do not need to add a file extension.

  2. string contents - The string to write in the file

Returns:

  1. string file - The contents of the file as a string

Example:

input:

local stats = "strength:1 defense:1"
‚Äč
function Start()
File.WriteCompressed("statsSaveFile", stats);
end

output:

statsSaveFile.txt will be written (or over-written) with the text "strength:1 defense:1" in a compressed format. File.Read will give you either gibberish or nothing. You need to read your data with ReadCompressed.