My Script Is Not Spawning A Block

Hello, I was working on one of the projects right now then when I clicked to spawn a block it didn’t work BUT it prints everything on the script successfully when I clicked on that printed text then go back to clientside it worked what is going on??

my local script :

local CanPlace = true
local Domino
local Mouse = game.Players.LocalPlayer:GetMouse()
local Rotation = 0
local UIS = game:GetService("UserInputService")
local Reload = false

game:GetService("RunService").RenderStepped:Connect(function()
	if CanPlace == true then
		Domino = game.Workspace.Folder:FindFirstChild("Domino")
		if Domino then
			Mouse.TargetFilter = game.Workspace.Folder
			game.Workspace.Folder.Domino:SetPrimaryPartCFrame(CFrame.new(game.Players.LocalPlayer:GetMouse().Hit.X, game.Players.LocalPlayer:GetMouse().Hit.Y + 0.4, game.Players.LocalPlayer:GetMouse().Hit.Z))
			game.Workspace.Folder.Domino:SetPrimaryPartCFrame(game.Workspace.Folder.Domino:GetPrimaryPartCFrame()*CFrame.fromEulerAnglesXYZ(4.7,0,Rotation))
		else
			local new = game.ReplicatedStorage.Domino:Clone()
			new.Parent = game.Workspace.Folder
			Domino = new
			Mouse.TargetFilter = game.Workspace.Folder
		end
	end
end)

UIS.InputBegan:Connect(function(keycode)
	if keycode.KeyCode == Enum.KeyCode.R then
		Rotation = Rotation + math.pi/1.2
	end
end)

Mouse.Button1Up:Connect(function()
	if CanPlace == true then
		print("fired server")
		local cframe = Domino.PrimaryPart.CFrame
		game.ReplicatedStorage.Place:FireServer(cframe)
	end
end)

script.Parent.MouseButton1Up:Connect(function()
	if Reload == true then
		script.Parent.Text = "Play"
		game.ReplicatedStorage.Reload:FireServer()
		CanPlace = true
		Reload = false
	else
		script.Parent.Text = "Reload"
		game.ReplicatedStorage.Play:FireServer()
		CanPlace = false
		Reload = true
	end
end)

my script :

game.ReplicatedStorage.Place.OnServerEvent:Connect(function(player, cframe)
	print("place got fired")
	local new = game.ReplicatedStorage.Domino:Clone()
	for i,v in ipairs(new:GetChildren()) do
		v.CanCollide = true
	end
	new.Parent = game.Workspace
	new.PrimaryPart.CFrame = cframe
	print(cframe)
end)

What should I do?? (sorry if I had bad grammar)

Edit: Now it even doesn’t spawn when I go back to clientside

Any errors in the output? Make sure you’re referencing everything correctly.

No errors in the output and when I removed the setprimarypartcframe line it spawned at workspace then when I put setprimartpartcframe line back it didn’t work anymore, in my opinion, it sets that model cframe to a far distance which would destroy the model

So, this issue is it doesn’t spawn at all? I did a repo and it seems to work perfectly fine.

Ok, I just switched to the browser then go back to the studio then it worked WHAT IS GOING ON???

when i comment setprimarypartcframe at server script it spawn but when i uncomment it doesnt spawn

I right clicked and it spawned 2 in the game WHAT??

Edit: Nevermind i switched to broswer then go back to roblox player and then it worked

Alright Alright i cancollide all the model and it worked so the problem was cancollide :confused: