Function of storage
storage.set
Saves a value under key in this pack's storage.json; nil forgets it.
storage.set(key: string, value: any)
Parameters
keystringvalueanyUsed in
storage.set(key, p.data.coins)Guide: Coin rushstorage.set(key, p.data.coins)Guide: Coin rushstorage.set(key, t)Guide: Parkour, a room eachstorage.set(key, t)Guide: Parkour, a room eachstorage.set(key, (storage.get(key) or 0) + 1)Scoreboard with a button- Each write is checked at the assignment by the `storage.set` rules. ACustom blocks`ipairs` operations. `storage.set(key, view)` accepts views directly.Custom blocksplayers.on_leave(function(p) storage.set("coins." .. p.uuid, p.data.coins) end)Players