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

How to determine which side of a part mouse.hit lands on?

Asked by
Abandion 118
4 years ago

Couldn't find this anywhere.

1 answer

Log in to vote
1
Answered by 4 years ago

Just use the property TargetSurface.

local player = game:GetService("Players"):GetPlayerFromCharacter(character)
local mouse = player:GetMouse()
print(mouse.TargetSurface.Name)
0
Damn it, where was this? Checked the API page 10 times. Abandion 118 — 4y
Ad

Answer this question