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

How to see what side of the brick was clicked? [closed]

Asked by 10 years ago

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.

Locked by adark and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
3
Answered by
Dominical 215 Moderation Voter
10 years ago

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

0
This appears to have worked, thanks! thecanadiangamesnerd 20 — 10y
Ad