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

How do you find the angle of the hit of a mouse?

Asked by 10 years ago

Trying to do something with CFrame.Angles, but I dunno how to get it from a mouse. This might be a little confusing.

1guy=game.Players.hievery1
2mouse=guy:GetMouse()
3mouse.KeyDown:connect(function(k)
4if k=="e" then
5local hit=mouse.Hit
6-- This is the part where I can't the find the angle of mouse.Hit
7end
8end)

1 answer

Log in to vote
-1
Answered by 10 years ago

mouse.Hit returns a CFrame of where the mouse is pointing, so mouse.Hit.Angles would return the angle.

0
I've tried that. "Angles is not a valid member". hievery1 70 — 10y
Ad

Answer this question