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 9 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.

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

1 answer

Log in to vote
-1
Answered by 9 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 — 9y
Ad

Answer this question