So I have a server client relationship to spawn in / pick up items for my inventory system, where all my items are stored in a module script to hold all the item data an array of sub-arrays.
function pickupItem(player,item) local inv = Inventory:FindFirstChild(player.Name) local newItem = Instance.new("StringValue") newItem.Name = ItemModule[item.Name]["Name"] newItem.Parent = inv item:Destroy() end pickup.OnServerEvent:Connect(pickupItem)
print("Call to server to pickup "..obj.Name) pickupEvent:FireServer(obj)
I have only put a snippet of the code, but the issue only resides in these areas.
The Object exists on the client and the output results as such:
I have tried to pass different values, but I can’t imagine a workaround. I was hoping someone could provide some insight as this is my first time working with large scale server-client relations. I was thinking it has something to do with passing a userdata value, but it doesn’t seem to be the case. The object exists on the server and in the client.