Remote event not receiving the correct data

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.

Server Code:

    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)

Client Code:

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:
output

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.

Is obj created on the client? This must be the issue. If obj only exists locally then the server won’t be able to see reference to it.

1 Like

Yes the client clones it from ReplicatedStorage, and now typing this I realize the issue. It always happens like that LOL