How can i save values with plugins?

How can i save values or data with plugins so when ever the player leaves the data will be there and i can call it any time?

  1. What do you want to achieve? I am thinking saving values with script that act like datastore

  2. What is the issue? Is there any best way or api that does the job?

local datastore = instance.new("script")
datastore.soruce = {Value,Value}
1 Like

There are better alternatives

Save value:

local dataToSave = os.clock()
plugin:SetSetting("key", dataToSave)

Get saved value:

local data = plugin:GetSetting("key")
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.