Why is my datastore script not working on line 9?
Asked by
5 years ago Edited 5 years ago
On line 9 the (Table[Plr]) part has an error.
SCRIPT:
01 | local DataStore = game:GetService( 'DataStoreService' ):GetDataStore( 'Data' ) |
04 | game:GetService( 'Players' ).PlayerAdded:Connect( function (Plr) |
05 | local DKey = 'Key' .. Plr.UserId |
06 | local Data = DataStore:GetAsync(DKey) or { |
13 | game:GetService( 'Players' ).PlayerRemoving:Connect( function (Plr) |
14 | local DKey = 'Key' .. Plr.UserId |
15 | local Data = Table [ Plr ] |
16 | DataStore:SetAsync(DKey, Data) |