local Player = game:GetService("Players").LocalPlayer
local Cursor = Player:GetMouse()
Cursor.Move:Connect(function()
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
if (Humanoid:GetState() ~= Enum.HumanoidStateType.Dead) then
local CursorPosition = Cursor.Hit.p
local CenterPosition = Character.Torso.Position
local LookVector = Vector3.new(CursorPosition.X,CenterPosition.Y, CursorPosition.Z)
Character.Torso.CFrame = CFrame.new(CenterPosition, LookVector)
end
Humanoid.AutoRotate = false
end)
Works, but is choppy. It moves instantly. I tried using tweenservice to make it smooth, but nothing I tried worked.
local Player = game:GetService("Players").LocalPlayer
local Cursor = Player:GetMouse()
local TweenService = game:GetService("TweenService")
Cursor.Move:Connect(function()
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
if (Humanoid:GetState() ~= Enum.HumanoidStateType.Dead) then
local CursorPosition = Cursor.Hit.p
local CenterPosition = Character.Torso.Orientation
local LookVector = Vector3.new(CursorPosition.X,CenterPosition.Y, CursorPosition.Z)
local goal = {CFrame = CFrame.new(CenterPosition, LookVector)}
local tweeninfo = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0)
local tweenlook = TweenService:Create(Character.Torso,tweeninfo,goal)
tweenlook:Play()
end
Humanoid.AutoRotate = false
end)
I see some values changing, but nothing happens. Anyone know more about this or if there's a better method to make it smoother?

1 comment
Doesn't work. Doesn't rotate fully, and it's still choppy.