here's the LOCAL script:
--in a local script, instantiate all unchanging variables outside of functions
local localPlayer = game.Players.LocalPlayer
local PlayerName = localPlayer.Name
local WorkspaceCharacter = game.Workspace:WaitForChild(PlayerName)
local charHead = WorkspaceCharacter:WaitForChild("Head")
local charPos = charHead.Position
-- why set the left foot of the character or the player name to a variable if you never use it?
script.Parent.MouseButton1Click:Connect(function()
local NewPart = Instance.new("Part")--second arg is deprecated
NewPart.Position = Vector3.new(charPos)--don't forget to close your functions
NewPart.Parent = game.Workspace --set the parent after setting all of the other properties of the new part
end)

2 comments
i was trying to figure out how to make it so it spawns in front of the character so how would i teleport the block and then add onto the cframe to make it anchored and collide on but not going into the character
You can add the lookVector of the body part you want it to go in front of.