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
 

So i was trying to learn how to make my own DataStores and..

Previous Thread :: Next Thread 
lulified is not online. lulified
Joined: 05 Mar 2016
Total Posts: 16
25 Dec 2016 09:36 AM
I ran into trouble. Somebody had told me i was using GetAsync wrong so i changed it but it still doesn't work. Suggestions or ideas on how i can fix this?

local DataStore = game#########################################################cal Players = game.ServerStorage.Players

game.Players.PlayerAdded:Connect(function(Player)
local Key = Player.UserId
local UnResetableStats = Players:WaitForChild(Player.Name).UnResetableStats
local ResetableStats = Players:WaitForChild(Player.Name).ResetableStats

for i,v in pairs(ResetableStats:GetChildren()) do
local PStats = DataStore:GetAsync(Key)
if PStats then
v.Value = PStats
end;
end;
end);

game.Players.PlayerRemoving:Connect(function(Player)
local Key = Player.UserId
local UnResetableStats = Players:WaitForChild(Player.Name).UnResetableStats
local ResetableStats = Players:WaitForChild(Player.Name).ResetableStats

for i,v in pairs(UnResetableStats:GetChildren()) do
DataStore:SetAsync(Key, v.Value)
end;

for i,v in pairs(ResetableStats:GetChildren()) do
DataStore:SetAsync(Key, v.Value)
end;
end);


Report Abuse
RaulChaser is not online. RaulChaser
Joined: 07 Dec 2014
Total Posts: 655
25 Dec 2016 09:40 AM
I suggest you learn to make your titles clean and simple
Report Abuse
lulified is not online. lulified
Joined: 05 Mar 2016
Total Posts: 16
25 Dec 2016 09:42 AM
They are clean and simple, idk what your talking about.


Report Abuse
lulified is not online. lulified
Joined: 05 Mar 2016
Total Posts: 16
25 Dec 2016 09:57 AM
I tried saving 1 value and it worked but i cant save all of them using a loop. How would i do this?


Report Abuse
RaulChaser is not online. RaulChaser
Joined: 07 Dec 2014
Total Posts: 655
26 Dec 2016 03:29 PM
"So i was trying to learn how to make my own DataStores and.."
Very clear and simple, it was to the point and I didnt need to read the description to figure out the problem
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