Can anyone tell me what I did rouge in this?
local DataStoreService = game:GetService('DataStoreService')
local Con = script.Parent.Con
local Storage = Con.Storage
local Prim = Con.Prim
local Sec = Con.Sec
local Key = game.Players.LocalPlayer.userId
-- Slots
local DSS1 = DataStoreService:GetDataStore('Slot1')
local DSS2 = DataStoreService:GetDataStore('Slot2')
local DSS3 = DataStoreService:GetDataStore('Slot3')
local DSS4 = DataStoreService:GetDataStore('Slot4')
-- Prim
local Primm = DataStoreService:GetDataStore('Prim')
-- Sec
local Secc = DataStoreService:GetDataStore('Sec')
-- Function
game.Players.PlayerAdded:connect(function()
Storage.Slot1.Value = DSS1:GetAsync(Key)
end)
game.Players.PlayerRemoving:connect(function()
DSS1:SetAsync(Key, Storage.Slot1.Value)
end)

3 comments
What's the issue?
It wont save the data when the player leaves
or getting the data