local player = script.Parent
local lStat = player:FindFirstChild("leaderstats")
local rblxutility=game:GetService("HttpService")
lStat.Rank:GetPropertyChangedSignal("Value"):Connect(function()
lStat.Rank.Value=math.floor((script.Parent.Value/100)+1)
end)
player.realstats.Inventory:GetPropertyChangedSignal("Value"):Connect(function()
local inventory=rblxutility:JSONDecode((player.realstats.Inventory.Value)
local currentitem = inventory[i]
for j = 1 i - 1 do
local item = inventory[j]
if currentitem.itemid == item.itemid then
item.quantity = item.quantity + currentitem.quantity
table.remove(inventory, 1)
break
end
end
local maincontrol = game:GetService("ReplicatedStorage").MainControl
player.realstats.Inventory.Value = rblxutility:JSONEncode(inventory)
end)
#I can't get it to push the table to the inventory manager to update the inventory
13 messages · Page 1 of 1 (latest)
I can't get it to push the table to the inventory manager to update the inventory when the script runs
It keeps throwing an error: "Cannot pass value to Object"
I can't get it to push the table to the inventory manager to update the inventory when the script ru
I can't get it to push the table to the inventory manager to update the inventory
What line is the error?
26
player.realstats.Inventory.value = rblxutility:jsonencode(inventory)
im making a cw game btw
Dunno how HttpService works, never tried intending to use it so idrk
I'm sorry
@storm ivy the error is self-explanatory tho
What kind of value is player.realstats.Inventory
we fixed it