I'm trying to rotate a player's torso to player's mouse in R6 using a local script.
as here: https://prntscr.com/sqlxcn
it's useless to know my old script because it rotates the player's arms, but I want to rotate the player's torso, but due to the conditions I publish it:
plr = game.Players.LocalPlayer;
repeat wait() until plr.Character
char = plr.Character
m = plr:GetMouse()
game["Run Service"].RenderStepped:connect(function()
local c = game.Workspace.CurrentCamera
print(workspace.CurrentCamera.CFrame)
char.Torso["Right Shoulder"].C0 = CFrame.new(Vector3.new(1,-0.7 , math.asin((m.Origin.p - Vector3.new(0,0,0) - m.Hit.p).unit.y)) + plr.Character.Torso.CFrame:toObjectSpace(workspace.CurrentCamera.CFrame).p ) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y),1.55,0)
char.Torso["Left Shoulder"].C0 = CFrame.new(Vector3.new(-1,-0.7 , math.asin((m.Origin.p - Vector3.new(0,0,0) - m.Hit.p).unit.y)) + plr.Character.Torso.CFrame:toObjectSpace(workspace.CurrentCamera.CFrame).p ) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y),-1.55,0)
local cam = workspace.CurrentCamera
end)
