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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

OMGGG DATASTOOORE

Previous Thread :: Next Thread 
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
31 Jul 2015 06:15 PM
@DeveloperBlue http://prntscr.com/7zfbi9
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
31 Jul 2015 06:17 PM
@ShungTzu http://prntscr.com/7zfcme
Report Abuse
DeveloperBlue is not online. DeveloperBlue
Joined: 15 Apr 2009
Total Posts: 1344
31 Jul 2015 06:59 PM
On your screenshot

http://prntscr.com/7zfbi9

Where it says

*84)) then

remove one of the parenthesis

So it's

*84) then

Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
31 Jul 2015 07:40 PM
Still doesn't save, load....... I'm seriously pssed off now, WHY DOESN'T IT WOOOOOOOOOOOOORKKKKKKK!?!?!?!?!!?
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
31 Jul 2015 08:12 PM
.
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
31 Jul 2015 08:40 PM
print(player.Name..' '..tostring(loaded))
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
31 Jul 2015 08:43 PM
You can have the Module for 50k.
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
31 Jul 2015 09:32 PM
Ok so I did some testing in studio and it seems to save fine

03:31:25.545 - Disconnect from 127.0.0.1|59327
Saving data for Player2
Player -2 leaving
Player2 Race 2
Player2 Level 1
Player2 PowerLvl 52613
Player2 EXP 0
Player2 Hair 3
Player2 HairCol 3
Player2 Face 2
Player2 BColor 1
Player2 Top 1
Player2 Bottom 1
Data should be saved for Player2

But when I play the game, change some of the stuff and rejoin nothing loads..........
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
31 Jul 2015 10:16 PM
nuump
Report Abuse
robloxer8282 is not online. robloxer8282
Joined: 25 Dec 2012
Total Posts: 819
31 Jul 2015 10:22 PM
maybe it broke
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
31 Jul 2015 11:50 PM
bumpppp
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
01 Aug 2015 12:51 AM
PPPPppPPPPPPPllllLLLLLllleLEeEEAaAAAAaaaaaaassssSSSSeeeee
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
01 Aug 2015 01:09 AM
OGM PLEASEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE WHY DOESNT IT WOOOOOOOOOOOOOOOOOOOOOOOOOORK
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
01 Aug 2015 01:20 AM
STOP TAKING MY LORDS NAME IN VAIN
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
01 Aug 2015 01:30 AM
e.e
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
01 Aug 2015 02:39 AM
bump
Report Abuse
000killnoobs000 is not online. 000killnoobs000
Joined: 03 Feb 2012
Total Posts: 503
01 Aug 2015 03:44 AM
omg im so dumb, all i had to do is use the free datastore model, omg. anyway it's my fault, thanks to anyone who helped!!
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
01 Aug 2015 06:42 AM

Okay bud you suffered long enough.
Note to test this on ONLINE play.
If you want to test in studio, you MUST set the place id to a place's id. (your own place id)


local DataStore = game:GetService("DataStoreService")
local Directory = DataStore:GetDataStore("PlayerSave")

local Stats = {
"Attack", "Strength", "Defense"
}

local Load = function(player, key)
assert(player, "No player was specified")
local val = Directory:GetAsync(player.userId.."/"..key)
assert(val, "Could not load " .. key .. " for player " .. player.Name)
local iv = Instance.new("IntValue")
iv.Name = key
iv.Value = tonumber(val)
return iv
end

local Save = function(player, obj)
assert(obj, "No Value specified")
Directory:SetAsync(player.userId.."/"..obj.Name, obj.Value)
end

game.Players.PlayerAdded:connect(function(plr)
local folder = Instance.new("Folder")
folder.Name = "Stats"
folder.Parent = plr
for _, v in pairs(Stats)do
Load(plr, v).Parent = folder
end
end)

game.Players.PlayerRemoving:connect(function(plr)
local stats = plr:FindFirstChild("Stats")
assert(stats, "Player doesn't have stats!")
for _, v in pairs(stats)do
Save(plr, v)
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 3 of 3Go to page: 1, 2, [3] Prev
 
 
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