Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to have your character face your mouse?

Asked by 5 years ago

I made a script where your character will be facing your mouse, but it is very jumpy and the character is tilted over.

https://gyazo.com/6570c87d5a0d4a1369f884f105fc2567

wait(1)
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()
local HRootPart = Player.Character.HumanoidRootPart
Player.Character.Humanoid.AutoRotate = false

Mouse.Move:Connect(function()
    HRootPart.CFrame = CFrame.new(HRootPart.Position, Mouse.Hit.Position)
end)

Answer this question