1
I want to know if it exists since I have a data storage system, in which the data stays in a table and when the player enters,this data is stored in a module script (The only one that returns something). The problem is that you can’t keep writing 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 gave error. Appeared "Expected Dentifier,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
It’s not enough to do
inventory=async
?– lhf
I don’t know, I don’t think so, because before using require,Inventory is a cloned module in the Playergui folder, inside the player object. You can’t test it now because I’m away from home. If you want to test it for yourself, I’m using it. ROBLOX Studio
– arthurgps2