My task here is to get the linked sword to be facing the green dot, and not the body itself. In other words, I want the sword to get as close as possible to the player.
I’ve tried rotating the sword itself, expecting that the character would go along with it (to no avail, most likely because of negative IQ).
Anyway, I think the resolution would be to calculate some magic number that serves as a CFrame for the HumanoidRootPart, which accounts for the sword’s Position / Rotation.
The code I’m using in the picture above is basically:
local lookAt = CFrame.lookAt(
humanoidRootPart.Position,
Vector3.new( -- This extra code is so that the character doesn't lean into green dot. I simply want it to face the point.
greenDot.Position.X,
humanoidRootPart.Position.Y,
greenDot.Position.Z
)
)
humanoidRootPart.CFrame = lookAt;
So, uhh… Any big brains out there (explain to me like I’m 5 years old)?