generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Datastorage help?

Previous Thread :: Next Thread 
UnderWorldOnline is not online. UnderWorldOnline
Joined: 31 Dec 2010
Total Posts: 7883
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
UnderWorldOnline is not online. UnderWorldOnline
Joined: 31 Dec 2010
Total Posts: 7883
15 Jan 2015 01:36 PM
b1
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
15 Jan 2015 01:38 PM
It would appear that Table.Clone is a nil value.
Report Abuse
UnderWorldOnline is not online. UnderWorldOnline
Joined: 31 Dec 2010
Total Posts: 7883
15 Jan 2015 01:39 PM
I don't know what to do..
Report Abuse
UnderWorldOnline is not online. UnderWorldOnline
Joined: 31 Dec 2010
Total Posts: 7883
15 Jan 2015 01:50 PM
b2
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image