SO, quick and simple, when i set the humanoidrootpart’s cfame with cframe.lookat() it doesnt face it twoards the other part.
local hrp = script.Parent.HumanoidRootPart
hrp.CFrame = CFrame.lookAt(hrp.Position,ray.Instance.Parent.HumanoidRootPart.Position)
This sometimes moves the players humanoid, but doesnt rotate it twoards the hit player.
Please help, i might just be dumb but i cant figure out how to solve this, ive tried even using a tween, setting the CFrame with CFrame.new(), but none of it works.
EDIT: this is a local script, that checks if the raycast hits something with a humanoid and humanoid rp.
if ray.Instance.Parent:FindFirstChildOfClass("Humanoid") and ray.Instance.Parent:FindFirstChild('HumanoidRootPart') then
local hrp = script.Parent.HumanoidRootPart
script.Parent:SetPrimaryPartCFrame(CFrame.lookAt(hrp.Position,ray.Instance.Parent.HumanoidRootPart.Position))
edit: when i did the expected, i just looked at the humanoidrootpart myself, so it didnt look upwards, with the other one i just let it go up before screen shotting
hey, sorry again, but this still does the same thing, where it just looks the same way as the mouse was before changing the cframe. The height of the camera isnt what im worried about, just making it look at the other part