How do I check the look vector the players mouse click

So lately I have been working on a game of mine and to save lag when a player deletes a block it will fill a block all around the to hide the view of the void but I got an issue it only works if I delete the block below me and if I delete the block in any other direction the script places a block into my character and I know how to fix it I just don’t know how to achieve it this is my script so far.

DeleteEvent.OnServerEvent:Connect(function(plr, BlockPosition)
	for i, Part in pairs(BlockGeneratedFolder:GetChildren()) do
		if Part.Position == BlockPosition then
			local PointsTable = {
				Part.CFrame.LookVector,
				Part.CFrame.RightVector,
				Part.CFrame.LookVector * -1,
				Part.CFrame.RightVector * -1,
				Part.CFrame.UpVector * -1
			}
			for i = 1, 5, 1 do
				local ray1 = workspace:Raycast(Part.Position + PointsTable[i], PointsTable[i])
				if not (ray1) then
					BlockModule.CreateFillBlock(Part.Position + PointsTable[i]*3, GenerationObjectFolder, BlockGeneratedFolder)
				end
			end
			
			Part:Destroy()
		end
	end
end)

All I need it to do is check what look vector the player clicked and ignore that in the loop.

What I mean is I want it to ray cast every vector expect the vector the player clicked if that makes sense.

Thanks for any help

The problem is a little hard to understand, but this might solve your issue since your problem is that it creates a block inside of your character. Though it can also mean that the BlockPosition variable is on top of your character.

DeleteEvent.OnServerEvent:Connect(function(plr, BlockPosition)
    for i, Part in pairs(BlockGeneratedFolder:GetChildren()) do
        if Part.Position == BlockPosition then
            local PointsTable = {
                Part.CFrame.LookVector,
                Part.CFrame.RightVector,
                Part.CFrame.LookVector * -1,
                Part.CFrame.RightVector * -1,
                Part.CFrame.UpVector * -1
            }
            local IgnorePlayer = RaycastParams.new()
            IgnorePlayer.FilterDescendantsInstances = { Part, plr.Character }
            IgnorePlayer.FilterType = Enum.RaycastFilterType.Exclude

            for i = 1, 5, 1 do
                local ray1 = workspace:Raycast(Part.Position + PointsTable[i], PointsTable[i], IgnorePlayer)
                if not (ray1) then
                    BlockModule.CreateFillBlock(Part.Position + PointsTable[i]*3, GenerationObjectFolder, BlockGeneratedFolder)
                end
            end
            
            Part:Destroy()
        end
    end
end)

What I mean is what ever side of the block you clicked it wont place a block on that side/ it wont raycast in the direction of the block you clicked I know how to fix it I just need to know how do I check witch look vector the player clicked and how to ignore it in the loop.