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

How to make the player's torso looks in the mouse direction ?

Asked by 6 years ago
Edited 6 years ago

I would like to make the player looks in the mouse direction. It would be like "fighting games with magic", where you charge your spell by holding left click, and, while u are charging, u can aim with your mouse and your torso is facing where u are aiming. For now, i have this script :

while wait() do
    player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position, mouse.Hit.p)
end

By using it, i encountered a few problems. First, my player is looking where i aim. That's a good thing but when i'm using it, i dont why but im always getting up. That's when i'm jumping. When i'm just landing, i go through the ground, go down for a few studs, then go up again. I would like to fix this but i dont know why it happens

0
This guide might be outdated but give it a try - http://wiki.roblox.com/index.php/Camera_manipulation MooMooThalahlah 421 — 6y
0
That's what Shift Lock and 1st Person Mode both do. Dumb question. DeceptiveCaster 3761 — 6y

Answer this question