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 » Scripting Helpers
Home Search
 

DataStore[2]

Previous Thread :: Next Thread 
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
06 Mar 2014 09:59 PM
local ds = game:GetService("DataStoreService"):GetDataStore(name, scope)

What is name and scope? I dont understand those 2 main parts, I think I dont understand how to use data store...

●▂▂●
Report Abuse
JTrozzo is not online. JTrozzo
Joined: 05 Apr 2011
Total Posts: 646
06 Mar 2014 10:22 PM
you need to load the data onto the script your running for the parts. It ends the script that for the joints to stop working. It will store the data onto your local drive. Good luck!
Report Abuse
lsparks is not online. lsparks
Joined: 12 Mar 2014
Total Posts: 14
07 Mar 2014 11:03 AM
Name is just the name you want the Data Store to use. Scope is the name of a collection of data stores. Unless your game is very complex, you can usually just define the name and leave the scope part blank. This will put your data store in a special scope called "general". So for instance if I wanted to make a data store to hold player experience, I might access the data store like this:

local ds = game:GetService("DataStoreService"):GetDataStore("playerexpstore")
Report Abuse
Cawlonee is not online. Cawlonee
Joined: 03 Mar 2014
Total Posts: 2687
07 Mar 2014 12:20 PM
According to the wiki, if you don't specify a scope, it goes to "global" not "general"...

I'm really curious to see which is correct.

http://wiki.roblox.com/index.php/Data_store#GetDataStore.28name.2C_scope_.3D_.22global.22.29
Report Abuse
Aphyllous is not online. Aphyllous
Joined: 18 Sep 2013
Total Posts: 300
07 Mar 2014 12:25 PM
@lsparks

let's say the datastore "abcdefg" didn't exist;

if i tried to use :GetDataStore("abcdefg") would it return nil or create a new datastore with that name?
Report Abuse
lsparks is not online. lsparks
Joined: 12 Mar 2014
Total Posts: 14
07 Mar 2014 02:40 PM
@Cawlonee: You are 100% right. It is "global". It was early when I wrote that response. Maybe I should start drinking coffee...

@Aphyllous: GetDataStore will never return nil. The data store will be created if it doesn't exist already.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 02:41 PM
Its like GetService then?:P
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
13 Mar 2014 07:36 PM
Ok thanks. So how exactly do you save a string value? Im really confused.

●▂▂●
Report Abuse
Mastermindperson is not online. Mastermindperson
Joined: 20 Jun 2011
Total Posts: 13531
16 Mar 2014 05:58 AM
hax

i r teh pwnz0r!
Report Abuse
Cawlonee is not online. Cawlonee
Joined: 03 Mar 2014
Total Posts: 2687
16 Mar 2014 06:00 AM
hax @ lsparks post date and join date.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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