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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 27 Nov 2015 02:06 PM |
| He never said anything about DataStores. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|