I want to add savings slots to my game, but I don't know how I know that I need to use DataStore but... Is there any way to have saving slots
You could prefix the data store keys with 'slot1_' followed by the user ID of the player.
To create saving slots in a Roblox DataStore, you can use the SetAsync
method of the DataStoreService class. Here's an example of how you might use it:
local DataStoreService = game:GetService("DataStoreService") local myDataStore = DataStoreService:GetDataStore("MyDataStore") local function saveData(player, data) local playerKey = tostring(player.UserId) myDataStore:SetAsync(playerKey, data) end local function loadData(player) local playerKey = tostring(player.UserId) local success, data = pcall(myDataStore.GetAsync, myDataStore, playerKey) if success then return data end end