On line 9 the (Table[Plr]) part has an error.
SCRIPT:
local DataStore = game:GetService('DataStoreService'):GetDataStore('Data') local Table = {"Cash"} game:GetService('Players').PlayerAdded:Connect(function(Plr) local DKey = 'Key'.. Plr.UserId local Data = DataStore:GetAsync(DKey) or { Cash = 0 }, Table[Plr] end) game:GetService('Players').PlayerRemoving:Connect(function(Plr) local DKey = 'Key'.. Plr.UserId local Data = Table[Plr] DataStore:SetAsync(DKey, Data) end)
you script has too much information, the computer cannot think so much.
from line 06,
local Data = DataStore:GetAsync(DKey) if not Data then Data = {Cash = 0} end Table[Plr] = Data