local p = game.Players.LocalPlayer
local m = p:GetMouse()
m.Button1Down:Connect(function()
local p = Instance.new("Part")
p.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Head.CFrame * m.Hit.LookVector*2)
p.Parent = workspace
end)
When I click, it places itself correctly for a bit, after walking around a little bit, it suddenly spawns at random positions. How would I fix this?

1 comment
I am trying to place the part where you click put at a fixed distance.