|
| 15 Jan 2015 01:30 PM |
What's wrong with this? I'm trying to create a script that autosaves the player's weapons, and gives it back to them when they rejoin the game, whether its a new server or not.
local Player = game.Players.LocalPlayer local DataStore = game:GetService("DataStoreService"):GetDataStore('key') local table = {} a = Player.Backpack:GetChildren() for i = 1,#a do table.insert(table,a[i].Name) wait(.3) end game.Players.PlayerAdded:connect(function(player) local key = 'user__'..player.userId DataStore:UpdateAsync(key, function(table) local Weapons = table or nil table:Clone(Player.Character.BackPack) return Weapons end) end)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Jan 2015 01:38 PM |
| It would appear that Table.Clone is a nil value. |
|
|
| Report Abuse |
|
|
| |
|
| |
|