Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

is it safe to do datastores in a module?

Asked by 4 years ago

So A module is a table {}

What I do is insert a table with the index as the players userid and then I insert a bunch of words from the datastores

for example the name of tools is what gets inserted

it looks like this

module = {}

module[player.userid] = {

Backpack = {},
Inventory = {},
    }

But I was wondering if it was safe

0
Yes, as long as you store the script in ServerScriptService and do not allow the client to directly edit it in anyway(would need to go through a server script) ForeverBrown 356 — 4y
0
yeah. and you can put the module wherever you want really. you can use RunService's isServer to make sure the player doesn't do anything bad like update their data from the client.. if you need the player to access data in the module script you can use functions to return data from the module script. just make sure your player data is private (not in the module table) so the player can't access it royaltoe 5144 — 4y

Answer this question