I'm trying to set the CFrame of the HumanoidRootPart to the same as a brick, except with the y position added by 3. I had to make a vector3 variable to do this, but now, when plugging the variable and the lookVector into a new CFrame, the lookVector isn't accurate, and rotates the HumanoidRootPart in a seemingly random (yet consistent) direction. Am I setting the CFrame wrong? What should I be doing?
game.Players.LocalPlayer.Character.HumanoidRootPart.CharacterHitBox.Touched:Connect(function(hit)
if deb == false then
deb = true
local pos = Vector3.new(hit.CFrame.X, hit.CFrame.Y + 3, hit.CFrame.Z)
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(pos, hit.CFrame.lookVector)
wait(0.2)
dashdeb = false
end
end)

1 comment
Thank you for the in-depth answer!