Reputation: 11
player.inventory.EquippedTool.Value = if returnValue.Inventory.EquippedTool ~= nil then returnValue.Inventory.EquippedTool else "BasicMike"
for _, tool in ipairs(player.inventory.OwnedTools:GetChildren()) do
print(tool.Name)
tool.Value = if returnValue.Inventory.Ownedtools[tool.Name] ~= nil then returnValue.Inventory.OwnedTools[tool.Name] else false
end
making code to save each players equipped tool data and this error came up
Upvotes: 1
Views: 239
Reputation: 3
Inventory? Do you mean
game.Players.player.Backpack
Backpack is a folder that contain all players tool that have not being equipped and If you want to find the tool player is currently holding that will be under player's Model
Upvotes: 0