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!