Hello!
I was attempting to create a localscript that spins your body towards your cursor, with animations (by changing animation.TimePosition), and a number between 0, and 1. I have tried LookVectors with the player's mouse, and it worked, but it wasn't the most efficient way to do it (it required a lot of trial and error to get the right number).
local cframe = game.Players.LocalPlayer:GetMouse().Hit
local point = animpoint.Length
local lookvector = cframe.LookVector --zvector?
animpoint.TimePosition = ((math.clamp(lookvector.Y,-1,1)+1)/2)*point --usually results in a number ranging from 0 to 1 (0 being facing directly down and 1 facing directly up)
p.s. the code above also suffers from the camera's rotation and isnt particularly accurate
However, the problem is with the rotation towards the mouse for the torso (the code above refers to the rotation of the arms). I have tried everything, cframe:GetOrientation(), cframe.LookVector.X, cframe.LookVector.Z, cframe.LookVector.X + cframe.LookVector.Z, but it was all useless, because it didn't always point the cursor (the camera often affected it).
Is there a easier-to-figure-out alternative to the torso rotation?
tl;dr: how do i rotate the torso/arms towards the cursor using animation.timeposition or hopefully something easier to deal with

1 comment
This... isn't really what I was looking for, but thanks anyway. I'll try this.