Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to see what side of the brick was clicked?

Heyya!

Just curious (for my game), I'm working on a script to place bricks. However, I only have it placing the brick on top of the other brick, and I'd like to figure out how to check what side of said brick was clicked when it is clicked. I'm using a localscript for this, as it's the best method for what I'm doing.

1 answer

✓ Accepted answer

You would use TargetSurface which is a property of the mouse object.

Make sure this script is in the ClickDetector:

script.Parent.MouseClicked:connect(function(player)
local mouse=player:GetMouse()
print(mouse.TargetSurface)
end)

For more information or help, click these links: http://wiki.roblox.com/index.php?title=TargetSurface http://wiki.roblox.com/index.php?title=Mouse

1 comment

0

This appears to have worked, thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.