Was wondering if there was a way to save a variable within a save game.
To give context I have a method that makes a random number when a new game is created, I want that number to stay the same till the end of that save.
local function randNumber()
local randNum = ZombRand(100)
--saveData(randNum)
end
Events.OnNewGame.Add(randNumber)
--this is just an example, I would like to know how to save any variable.
Edit: Nevermind I've found an answer, you can delete this post if you'd like.