I want to know if it exists since I have a data storage system, in which the data is in a table and when the player enters, that data is stored in a module script (The only one that returns something) . The problem is that you can not keep typing for example:
inventory=require(inventory)
inventory.Knifes=async.Knifes
inventory.ChosenKnife=async.ChosenKnife
inventory.Citrines=async.Citrines
--...
I've already tried
require(inventory)=async
But it made a mistake. Appeared "Expected identifier, got="
Please help me, I have little time!
Here's the block I'm working on:
dss=game:GetService('DataStoreService'):GetDataStore('GameStuff')
game.Players.PlayerAdded:connect(function(player)
local key='id='..player.userId
local async=dss:GetAsync(key)
if not async then
local save={Knifes={1},ChosenKnife=1,Citrines=,Coins=0}
dss:SetAsync(key,save)
async=dss:GetAsync(key)
end
local module=script.ModuleScript:Clone()
module.Parent=player:WaitForChild'PlayerGui'
--Modificar o valor retornado de module
end