Why isn't this code working?

You should also create a Part variable, so that you can easily define its properties that way

I’d also recommend not using the second parameter for Instance.new:

Put the LocalScript inside StarterPlayerScripts, and insert this:

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

Mouse.Button1Down:Connect(function()
    local Part = Instance.new("Part")
    --Assign your properties here
    Part.Parent = workspace
end)