So yeah I was wondering how I could make the player’s character point towards the mouse’s position at all times. If anyone can help me with this, I would appreciate it.
From the Mouse.Hit’s position, you can find the direction for the player to look by getting the difference vector of the two from the player’s Position, then you can use lookAtthis function is on the wiki page of the documentation of CFrame.fromMatrix on the CFrame page or CFrame.new(position, look) to make the player look at the position:
local dir = (Mouse.Hit.Position - HumanoidRootPart.Position).Unit -- getting the vector as a unit vector to obtain its direction
dir = dir * Vector3.new(1, 0, 1) -- with the Y-component taken into account, the player will tilt up and down to face the height of the position
-- (cont'd) We don't want that, so we'll project the vector onto the XZ plane by setting the y-component to 0
HumanoidRootPart.CFrame = CFrame.new(HumanoidRootPart.Position, HumanoidRootPart.Position + dir)
-- adding the direction onto their current position to face the mouse's position