Problem using Remote Event

So I have been attempting to fire this script on the server using a remote event:

Server-Sided:

REBlockPlace = game.ReplicatedStorage.RemoteEvents:WaitForChild("BlockPlace")

REBlockPlace.OnServerEvent:Connect(function(player, object, label)
	BuildBlock = object:Clone()
	BuildBlock:WaitForChild("SelectionTransparent"):Destroy()
	BuildBlock.Transparency = 0
	BuildBlock.Name = label
	BuildBlock.Parent = game.Workspace.PlotBlocks				
	BuildBlock.CFrame = object.CFrame
	BuildBlock.Anchored = true
	BuildBlock.CanCollide = false
	hb = BuildBlock:WaitForChild("HitBox")
	hb.Anchored = true
	hb.CanCollide = false
	hb.Position = object.Position
end)

Client-Sided:

UIS.InputBegan:Connect(function(input)
	if hovering == false then
		if SpawnEnabled == true then
			if input.UserInputType == Enum.UserInputType.MouseButton1 then
				REBlockPlace:FireServer(block, text)
			end
		end
	end
end)

The issue is that when I run this, I get the error that says:

:attempting to index nil with 'WaitForChild'

You had to refer the parents of REBlockPlace. Something like this you did in your script.

You never need to call WaitForChild on server objects that you already created, but what does your variable even point to?

Hey there,
I think your issue is that object has the Archivable setting off, therefore not allowing you to clone it. Try turning it on and see what happens. If you could also provide what line the error occurs on, I may be able to further help you.

What do you mean by “refer to parents?”

In the Client-Sided script, I don’t see him doing game.ReplicatedStorage.RemoteEvents:WaitForChild(“REBlockPlace”). Instead, he just typed REBlockPlace.

REBlockPlace is defined at the beginning of the script.

block (object) is nil, In the script you showing your not declaring it.

maybe you need to add a local in front of the variables you’re creating under the OnServerEvent for BuildBlock and hb. Idk if you already have the same variable outside the event so…just a thought.