Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make Character face mouse?

I'm trying to make the character aim/face at the mouse. I did this but it just shot my character forward and barely rotated it with the mouse.

MouseAim = Mouse.Hit.p

UserBodyAim = game:GetService("RunService").RenderStepped:connect(function(dt)
			Character.HumanoidRootPart.CFrame = CFrame.new(Character.HumanoidRootPart.Position, Vector3.new(MouseAim.x,MouseAim.y,MouseAim.z))
			wait(10)
			UserBodyAim:disconnect()
		end)

1 answer

Try using the mouse.lookvector instead, I would put 0 on the y axis though due to the fact that it gets glitchy on that axis.

3 comments

0

How would I even do this?

0

Replace mouseaim with mouse.lookvector

0

And the variable would be mouse.lookvector instead of mouse.hit.P

This discussion is preserved as it was. New answers, comments, and votes are closed.