Is there a way to make an R6 (specific) player rotate and point to where the mouse is on screen? Can't think of any examples, but I think I explained it in the best way I could.
✓ ANSWER ACCEPTED
Any way to make the player rotate towards the mouse?
1 answer
✓ Accepted answer
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
You should at least have coded the function you wanted, we are here to fix your mistakes not just outright make scripts.
It's called I'm asking if there is a way to do it.
Please be helpful instead of say you're here to correct mistakes. There needs to be a sense of education instead of straight up cutting off a question just because the function was not already detailed for you.