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: would a table work instead?

Previous Thread :: Next Thread 
salman110 is not online. salman110
Joined: 04 Sep 2008
Total Posts: 115
27 Nov 2015 01:36 PM
im a novice scripter, so please be patient with me, but i have common sense unlike a lot of the people that ask for help on here. i apologize about my grammar, but i don't use it on roblox.

this is more theory than actual code, and i could use someone experienced with using tables to give me advice on this

i want to create a constantly running database in players or workspace that updates stuff inside everytime something changes. im doing this so i can use scripts to get information from the database, such as who's in who's car, and what seat they are in that car, and the player's characteristics of those inside the car, and use this information to do stuff

for example a tank shell hits the car, the shell finds the car's unique ID in players/workspace, finds car's info: passengers inside it (their names), finds players' humanoids, reduces hp to 0

can a table be used instead for this, and if so, what type of table would allow this? and how well would it work, like can i call the table from another script to get information? i know that a table would basically be like the "mini database", but i'm not sure about the capabilities and the flexibility of tables in lua so i want to make sure it's possible before i try doing this with tables.

if you have an even better way than what i'm currently thinking of, please share

thanks in advance
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Nov 2015 02:03 PM
You can use _G. _G is a table that is shared between scripts on the same machine (So LocalScripts can't read/write to/from normal Scripts)
Report Abuse
SwagCuzYolo is not online. SwagCuzYolo
Joined: 31 Oct 2013
Total Posts: 1224
27 Nov 2015 02:05 PM
You can't use a datastore like that because there's a limit to how often you can update/get data from them. It tells you what the limit is on the wiki.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Nov 2015 02:06 PM
He never said anything about DataStores.
Report Abuse
SwagCuzYolo is not online. SwagCuzYolo
Joined: 31 Oct 2013
Total Posts: 1224
27 Nov 2015 02:09 PM
i want to create a constantly running database in players or workspace that updates stuff inside everytime something changes.


I assumed that he meant a datastore.
Report Abuse
salman110 is not online. salman110
Joined: 04 Sep 2008
Total Posts: 115
27 Nov 2015 02:29 PM
since i can't use a localscript to call _G. tables, and i'm using filtering enabled, would this be a problem? like when i need to read from the table from the player, would i be able to use a script instead, while not messing up the function of filtering enabled. i'm thinking of just taking the easy way and just doing what i was originally thinking
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