How do I spawn a brick on the HumanoidRootPart's CFrame?

In this script, I am trying to spawn a brick on the HumanoidRootParts cframe, facing the same direction as the player. However, the issue is that I get the error message of " Cframe is not a valid member of Part “Workspace.snipperdiaper.HumanoidRootPart”

So far i’ve messed with the script for about 30 minutes trying to see what was wrong with it, but I havent gotten anywhere

The script:

local tool = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
if not character or not character.Parent then
	character = player.CharacterAdded:wait()
end

tool.Activated:Connect(function()

	local part = game.Workspace:FindFirstChild("BariWall")
	local ClonedPart = part:Clone()
	ClonedPart.Parent = workspace
	ClonedPart.Position = humanoidRootPart.Cframe.New(humanoidRootPart)
end)

The line in question:

ClonedPart.Position = humanoidRootPart.Cframe.New(humanoidRootPart)

Any help or guidance is appreciated

CFrame, not Cframe (case-sensitive)
plus try not to mix Position and CFrame together thinking they will return the same values

ClonedPart.CFrame = humanoidRootPart.CFrame

local tool = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
if not character or not character.Parent then
	character = player.CharacterAdded:wait()
end

tool.Activated:Connect(function()

	local part = game.Workspace:FindFirstChild("BariWall")
	local ClonedPart = part:Clone()
	ClonedPart.Parent = workspace
	ClonedPart.CFrame = humanoidRootPart.CFrame
end)

You could also create a new instance instead of cloning it which could be better for organization

This worked!!! However, instead of spawning it infront of me, it spawns behind me :sob: Back to the drawing board for me

Edit: figured it out