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: The best way to save if a player owns something from shop?

Previous Thread :: Next Thread 
vydlv is not online. vydlv
Joined: 08 Jun 2010
Total Posts: 1517
27 Feb 2015 08:05 PM
Sorry for bad subject, had to take out some stuff when I ran out of room.

So if I'm making a shop for my game where you can buy different things such as "linkedsword", "illumina", "darkheart," how should I save that using data stores?

make a table with all the items the player owns? (you can save tables, right?)
make like a string with all the player's items?
somehow save everything separately?

I would think separately would be more easy to save (the shop wouldn't have just 3 items so saving the whole things sounds like a waste) but idk
Report Abuse
vydlv is not online. vydlv
Joined: 08 Jun 2010
Total Posts: 1517
27 Feb 2015 08:26 PM
bump
Report Abuse
vydlv is not online. vydlv
Joined: 08 Jun 2010
Total Posts: 1517
27 Feb 2015 09:50 PM
bump[2]
Report Abuse
vydlv is not online. vydlv
Joined: 08 Jun 2010
Total Posts: 1517
27 Feb 2015 09:59 PM
bump[3]
qq
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
27 Feb 2015 10:16 PM
Honestly, using Data-Persistence here would be much less complex than getting into DataStores.

-- Player buys LinkedSword, send request to RemoteEvent to save this value as true
player:SaveBoolean("OwnsLinkedSword", true);

-----------

-- Player enters server, let the server know if they own the sword or not
local playerHasSword = player:LoadBoolean("OwnsLinkedSword");

if playerHasSword then
-- give them the sword
end;
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
27 Feb 2015 10:21 PM
local datastore = game:GetService("DataStoreService"):GetDataStore("yes")


datastore:SetAsync(key,value)
datastore:GetAsync(key)
datastore:UpdateAsync(key, func)
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