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

How do I make the Player's head face towards Mouse?

Asked by 6 years ago

Here's my script:

Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
while true do
    wait()
    Player.Character.Head.Neck.C0 = CFrame.new(Player.Character.Head.Position, Mouse.Hit.p)
end

Problem is the head disappears. What is the problem with my script?

1
Pretty sure it's an offset. try CFrame.new(Player.Character.Head.Neck.C0.p,Mouse.Hit.p) RubenKan 3615 — 6y
0
Alright i'll try that, thanks! MRbraveDragon 374 — 6y
0
It work's but the Player's head turns all the way around. Anyway to prevent this? MRbraveDragon 374 — 6y
0
Determine if the head is turning too far on the Y axis with an if-then statement. If you need a better explanation, let me know and I'll post an answer. ax_gold 360 — 6y
View all comments (3 more)
0
If you don't mind explaining it more, that would be great! MRbraveDragon 374 — 6y
0
That also won't work at all because Neck.C0 is a torso offset not a simple cframe cabbler 1942 — 6y
0
So it can't be an offset? MRbraveDragon 374 — 6y

Answer this question