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
 

Re: Bool for DataStore

Previous Thread :: Next Thread 
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 12:12 PM
I don't know how to add bools and make them related to tools could someone help me I am trying to make it so my game can save weapons that are bought/sold

Best regards - Aspiring Noob
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 01:32 PM
Bump

Best regards - Aspiring Noob
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 02:35 PM
Bump 2

Best regards - Aspiring Noob
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 03:21 PM
Bump 3

Best regards - Aspiring Noob
Report Abuse
CounterCrysis is not online. CounterCrysis
Joined: 08 Oct 2007
Total Posts: 832
28 Jul 2014 03:26 PM
I'm pretty sure it would be the same as a string or integer being saved. So you would just use a key such as "ironsword" as the first parameter of SetAsync, and either true or false for the second parameter.
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 03:32 PM
So I wouldnt be using a bool value? Cause everytime I mentioned anything about it before everyone is like bool value but no one tells me how to use it or what it is.

Best regards - Aspiring Noob
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
28 Jul 2014 03:33 PM
just give up
Report Abuse
CounterCrysis is not online. CounterCrysis
Joined: 08 Oct 2007
Total Posts: 832
28 Jul 2014 03:46 PM
@BothAngles
Wow that was inspirational.

@tarrdo
Well I'm certainly not going to write the script for you. I will however provide you with links to learn how to do it.
http://wiki.roblox.com/index.php?title=Data_store
http://wiki.roblox.com/index.php?title=DataStore
http://wiki.roblox.com/index.php?title=SetAsync_(Method)
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 04:25 PM
So I dont need bool cause I already know how to use data store but I didn't think it could save the tool itself.

Best regards - Aspiring Noob
Report Abuse
CounterCrysis is not online. CounterCrysis
Joined: 08 Oct 2007
Total Posts: 832
28 Jul 2014 04:29 PM
Oh really? I don't think they can.
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 04:59 PM
Should have linked me here
http://wiki.roblox.com/index.php?title=Bool
Anyways to make a bool do I need to have a value or could I just name the tool outright?
if I need a value, how do I add a value to a tool?

Best regards - Aspiring Noob
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 05:39 PM
bump

Best regards - Aspiring Noob
Report Abuse
CounterCrysis is not online. CounterCrysis
Joined: 08 Oct 2007
Total Posts: 832
28 Jul 2014 07:17 PM
You aren't making sense, do you really know what a boolean is?
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 07:29 PM
Did I not say this before I HAVE 0 IDEA HOW TO USE A BOOLEAN BECAUSE I DONT UNDERSTAND IT I read through the boolean wiki but it didnt help at all.

Best regards - Aspiring Noob
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
28 Jul 2014 07:30 PM
A boolean is simply either true or false. A BooleanValue (roblox object) is an object that's Value property can be set to a boolean
Report Abuse
CounterCrysis is not online. CounterCrysis
Joined: 08 Oct 2007
Total Posts: 832
28 Jul 2014 07:37 PM
It seems more like you just don't know scripting and are trying to rush into doing something you have no experience in. Booleans are simple... They are equal to either true or false.

LuaIsAwesome = true
--OR
LuaIsAwesome = false

----------

local playerBoughtGun = true

if playerBoughtGun == true then

  --Give Player the gun

else

  --Player didn't buy the buy

end

----------

Note To Scripters: I know that I don't need the "== true" or "local".
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 07:40 PM
Thats the part I dont understand cnt I don't know how to give an object a value.

Best regards - Aspiring Noob
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
28 Jul 2014 07:43 PM
object.Value = valueyouwanttogiveit
You can do something like:

workspace.BoolValue.Value = true
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
28 Jul 2014 07:46 PM
so I could go _G[SilverSword].Value=1

workspace.BoolValue.1=True then SetAsync?

Sorry if I'm not getting this fast enough :/

Best regards - Aspiring Noob
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
29 Jul 2014 02:06 AM
bump

Best regards - Aspiring Noob
Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
29 Jul 2014 02:39 AM
What I would do is, insert a Bool, name it the weapon you want, then make a script that checks if those values are true, then it would find and copy those weapons into the player's backpack. I don't know if that's what you want.
Report Abuse
Seizurezxzz is not online. Seizurezxzz
Joined: 12 Feb 2013
Total Posts: 1297
29 Jul 2014 03:21 AM
I would go with raph,
BoolValues, name of the tools,
if they have it, turn it to on, if not, then off.

Then when ever they respawn/enter the game,
make it to where it checks if certain bools are true/false and
give tools accordingly.
Report Abuse
tarrdo is not online. tarrdo
Joined: 24 Jun 2008
Total Posts: 476
29 Jul 2014 11:44 AM
I would only want it to add the weapon on enter I can have it copy the weapon into startergear and it would stay in the backpack.

Best regards - Aspiring Noob
Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
29 Jul 2014 12:48 PM
Then function the script when the player enters.
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