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
|
  |
| Joined: 24 Jun 2008 |
| Total Posts: 476 |
|
|
| 28 Jul 2014 01:32 PM |
Bump
Best regards - Aspiring Noob |
|
|
| Report Abuse |
|
|
tarrdo
|
  |
| Joined: 24 Jun 2008 |
| Total Posts: 476 |
|
|
| 28 Jul 2014 02:35 PM |
Bump 2
Best regards - Aspiring Noob |
|
|
| Report Abuse |
|
|
tarrdo
|
  |
| Joined: 24 Jun 2008 |
| Total Posts: 476 |
|
|
| 28 Jul 2014 03:21 PM |
Bump 3
Best regards - Aspiring Noob |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 28 Jul 2014 04:29 PM |
| Oh really? I don't think they can. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 24 Jun 2008 |
| Total Posts: 476 |
|
|
| 28 Jul 2014 05:39 PM |
bump
Best regards - Aspiring Noob |
|
|
| Report Abuse |
|
|
|
| 28 Jul 2014 07:17 PM |
| You aren't making sense, do you really know what a boolean is? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 24 Jun 2008 |
| Total Posts: 476 |
|
|
| 29 Jul 2014 02:06 AM |
bump
Best regards - Aspiring Noob |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 03 Dec 2008 |
| Total Posts: 2479 |
|
|
| 29 Jul 2014 12:48 PM |
| Then function the script when the player enters. |
|
|
| Report Abuse |
|
|