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
 

Re: DataStore and Universes.

Previous Thread :: Next Thread 
preztonizer is not online. preztonizer
Joined: 22 Oct 2008
Total Posts: 375
23 Apr 2015 01:08 AM
So i have this script below and its to save what eggs you have collected. It works when you leave/rejoin and everything but when you go to one of the places in the universe it does not load the eggs from the previous universe but the second universe saves separately. Its all set correctly with teleports between each place. Ive used studio api and no errors.

data = game:GetService("DataStoreService"):GetDataStore("eggsave")

players.PlayerAdded:connect(function(player)
eggp = Instance.new("Folder")
eggp.Name = "eggs"
eggp.Parent = player
for i=1,#eggfolder do
if data:GetAsync(""..eggfolder[i].Name.." for "..player.Name.."") ~= nil then
eggy = Instance.new("NumberValue")
eggy.Value = data:GetAsync(""..eggfolder[i].Name.." for "..player.Name.."")
eggy.Name = eggfolder[i].Name
eggy.Parent = player:findFirstChild("eggs")
eggy.Changed:connect(function()
data:SetAsync(""..eggy.Name.." for "..player.Name.."", eggy.Value)
end)
end
end
eggp.ChildAdded:connect(function(what)
data:SetAsync(""..what.Name.." for "..player.Name.."", what.Value)
what.Changed:connect(function()
data:SetAsync(""..what.Name.." for "..player.Name.."", what.Value)
end)
end)
end)
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
23 Apr 2015 01:11 AM
Are the places in thesame game (Universe, Develop -> Games)
Report Abuse
preztonizer is not online. preztonizer
Joined: 22 Oct 2008
Total Posts: 375
23 Apr 2015 02:10 AM
So for the two places how should it be setup?
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
23 Apr 2015 03:17 AM
Develop -> Games, find the game and add the other place
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
23 Apr 2015 03:24 AM
Uhhh, you know about request limits for datastore right??
Report Abuse
preztonizer is not online. preztonizer
Joined: 22 Oct 2008
Total Posts: 375
23 Apr 2015 03:48 AM
Happy I had it set up like that. And its just a testing place currently with only 3 saveable values.
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
23 Apr 2015 03:53 AM
If you done that and the DataStores are exactly the same, you wouldn't have a problem.
Report Abuse
preztonizer is not online. preztonizer
Joined: 22 Oct 2008
Total Posts: 375
23 Apr 2015 12:31 PM
Nope nothing worked :/ if you want to see the place its here http://www.roblox.com/games/241095032/Cyans-Egg-Hunt-Mechanics
Meow
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