Malfunctioning RemoteEvent

I have a remote event that seems to be failing to pass values. While most remote events pass their values correctly, this one, in particular, seems to pass nothing but nil. I run a print right before the sender (a server script) fires the event, so I know the sender is passing the values right to the event. the print right after the event in the receiver, however, always gives all nils.

Sender (Server Script)

event = game.ReplicatedStorage.PreviewRequest

event.OnServerEvent:Connect(function(player, source, item)
	--local gui = player.PlayerGui.InventoryGui.Frame.DescriptionFrame.WorkingViewportFrame
	if item == "Campfire Kit" or item == "Heater Kit" then
		item = game.ServerStorage.Entities[string.sub(item, 1, -4)]
		item = game.ServerStorage[item]
	item = item:Clone()
	print(player, source, item)
	event:FireClient(player, source, item)

Receiver Script (Local Script)

TweenService = game:GetService("TweenService")
RunService = game:GetService("RunService")
counter = 0
event = game.ReplicatedStorage.PreviewRequest

event.OnClientEvent:Connect(function(source, object)
    print(source, object)
    item = object

camera ="Camera")
camera.Parent = script.Parent
camera.CFrame =, 2, 5), item.Position)
script.Parent.CurrentCamera = camera
local radius = 5
local center = item.Position
local rad, cos, sin = math.rad, math.cos, math.sin
local totalTime = 50
while true do
    counter = counter + 1
    camera.CFrame = + radius*cos(rad(counter%1440)), 2, center.Z + 

Relevant console output

TeamTabyGamez nil Apple (Server)
nil nil (Client)

1 Like

You are passing a reference to an instance which exists in ServerStorage. This does not exist on the client, therefore it is nil. You can place it in ReplicatedStorage where the client has access to. Objects are not sent over the client/server boundary, only their reference iirc.


Thanks! Just had to reparent the object and it worked. For some reason, my brain didn’t register that. Maybe after working for about 14+ hours, I should head to bed.