Using profile service for inventory.
Basically,
when 2 people farm together in my game, it gives both the items. If 1 person sells all, it gives them the bux, and I lose all my items.
Using profile service for inventory.
Basically,
when 2 people farm together in my game, it gives both the items. If 1 person sells all, it gives them the bux, and I lose all my items.
Code,most of the time we write something wrong by accident, make sure to check it out, firstly, check the sell function and see what’s going on there, that’s my advice since you dind’t showed any code snippet
It’s not in sell. It gives both players the item, and sell just sells both items, so it’s something to do with items itself. Heres my giveitem:
local GiveItemModule = {};
function GiveItemModule:GetItem(itemName, itemID, itemRAP)
local itemModule = require(script.Parent.Parent.Items)
local itemChecks = 0
local item;
for key, value in pairs(itemModule) do
if value.Name == (itemName or "Evolved " .. itemName) and value.AssetId == itemID and value.RAP == itemRAP then
itemChecks = 3
item = value;
break
end
end
if itemRAP > (2.8e309 or math.huge) then
itemChecks -= 1
end
if itemRAP < (1 or math.pi - 3.14) then
itemChecks -= 1
end
if itemID < (1000 or math.pi * 1000) then
item.Type = "Bundle"
item.AssortedBundles = {}
end
if itemChecks >= 3 then
return "Verified!", item;
else
return nil
end
end
function GiveItemModule:GiveItem(player, amount, item)
local Data = require(script.Parent.Parent.Data);
Data = Data.Data[player.UserId];
assert(Data, string.format("%s has no data!", player.Name));
Data = Data.Data;
assert(Data, string.format("%s has no data!", player.Name));
if typeof(item) ~= 'table' then
for key, value in pairs(require(script.Parent.Parent.Items)) do
if value.Name == item then
item = value
item.Amount = amount
break
end
end
end
local canGive, item = GiveItemModule:GetItem(item.Name, item.AssetId, item.RAP)
if not canGive then
return
end
for key, value in pairs(Data.Items) do
if value.AssetId == item.AssetId then
value.Amount += (amount or 1)
return;
end
end
item.Amount = amount;
item.Locked = false;
table.insert(Data.Items, item);
return;
end
return GiveItemModule;
Still no solution. Really major bug aswell!
Bump again. Still having the issue.