Remote event sending nil

Basically, I’m just trying to send an instance through a remote event. I had this bug before and I somehow managed to fix it, I think by sending the instance of a model from the server and then finding the part I actually wanted from inside the model on the client side. I’m not sure how that fixed it or if that was the actual fix but it worked. This time I’m just sending a mesh object so it isn’t in a model and I can’t get it to work.

Server side:

elseif hit.Name == "Torso" and hit:FindFirstChild("PickUpScript") ~= nil then
	debounce = true
	local box = presentbox:Clone()
	box.CFrame = hit.CFrame * CFrame.Angles(0, math.rad(90), 0)
	box.Parent = workspace
	print(box)
	game.ReplicatedStorage.RemoteEvents.UpdatePickUp:FireAllClients(box, false)
	hit.Parent:Remove()
end

Client side:

game.ReplicatedStorage.RemoteEvents.UpdatePickUp.OnClientEvent:Connect(function(part, past)
    print(part, past)
end)

Output:

PresentBox --Server
nil false --Client

There is only 1 player in the game at a time so I fire all clients for convenience sake. I genuinely don’t know what the issue is, if it’s a problem with sending a clone instance through a remote event or what. I’ve also sent is as workspace:FindFirstChild(box) and it doesn’t work. I can’t seem to find anyone else with this problem either. Any help would be great, thanks!

I guess I fixed it. I just put the part in its own group then sent the group instance and found the part in the group on the server side. It feels like I shouldn’t have to. If anyone has a reason for this, I’d love to hear it, but for now, I’ll set this as the solution in case anyone else has this problem.

1 Like

It’s perfectly fine to do this, don’t sweat it, don’t fix what’s not broken haha. :rofl:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.