Grid system how to fix my problem?

Hi there fellow devs! Today I am looking to create my own building system to place objects, but I have a couple of issues, first of, when I try to place a Dropper at my cursor’s location, the dropper keep moving even though the cursor is not moving… and I really don’t know how can I make it only placeable on the black tiles, I don’t want it to be placed anywhere else, I would need a couple of explaining of y’all and help to finish this little project of mine which seems so big to me, I need to fix the fact that It can be ONLY placeable on the black tiles and to fix the object position, Thanks you guys for your answers!

local function round(vector, grid)
	print(Placed.Item.Hitbox.Size.Y / 2)
	return Vector3.new(
		math.floor(vector.X / grid + 0.5) * grid,
		(Placed.Item.Hitbox.Size.Y / 2) + workspace.Base.BasePlates.Baseplate.Position.Y + 0.5,
		math.floor(vector.Z / grid + 0.5) * grid
	)
end

local Changed = UserInputService.InputChanged:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseMovement and Placed.Item then
		local hit, pos, normal = workspace:FindPartOnRay(Ray.new(Mouse.UnitRay.Origin, Mouse.UnitRay.Direction * 100), Player.Character)
		Placed.Item:SetPrimaryPartCFrame(CFrame.new(round((pos + normal), 2)))
	end
end)

https://gyazo.com/cd8432b2f4cf4cdae574a31dd5e3970b

Well, to fix the model moving around like crazy, you should probably put the furniture model in the 2nd parameter of the :FindPartOnRay function, instead of Player.Character.

And to allow the model to be put on the black tiles only, put an if statement
if hit.Name = "BlackTileNameOrWhatever" then
before this line

The if statement will check whether the model is being placed on the black tile or not.

However, this method will allow the model to be placed half on the black tile (part is on the black tile and part is in air)
If you don’t want this, check the X and Z coordinates of the position gotten from the ray, and if they are beyond the limits, don’t allow the model to be placed

Hope this helped!