OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 30 Nov 2013 03:07 PM |
How do i detect what surface the mouse clicked?
♫~DUBSTEP ]V[AY RULE THE WORLD~♫ |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 30 Nov 2013 03:10 PM |
It's a property of the mouse object. You could get mouse like this, in a LocalScript:
local mouse = game.Players.LocalPlayer:GetMouse() while wait() do print(mouse.TargetSurface.Name) end
~ Oh, I'm sorry, did I break your concentration? ~ |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 30 Nov 2013 03:16 PM |
but the problem is that the front should always face you, but if you tilt your brick, the bottom or back could be front... this could mess up my project because im trying to make a flat brick to tilt depending what surface you clicked and attach to it. I dont want it to be sticking out of the wall, but flat on to it, same goes to the floor and stuff....
♫~DUBSTEP ]V[AY RULE THE WORLD~♫ |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 30 Nov 2013 03:29 PM |
...What? Do you mean like a bullet hole system or something?
~ Oh, I'm sorry, did I break your concentration? ~ |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 30 Nov 2013 03:32 PM |
ok, let me explain:
This is a wall: | | |
This is the part:
_
and if i click the wall, the part rotates to what the mouses direction clicks, so it would rotate 90 degrees and attach to the part. | || |
if there is a cube:
______ |----| |----| |____|
and you click on one of the surfaces, the part would rotate to the surfaces rotation and attach to it in the correct rotation, not standing up or anything... this was probably a really bad explanation but thats the best i got
♫~DUBSTEP ]V[AY RULE THE WORLD~♫ |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 30 Nov 2013 03:36 PM |
Okay, so I get what you mean, I just don't know how I'd explain it. Perhaps look up some bullet hole creating scripts, they do the same thing but put a decal on the part.
~ Oh, I'm sorry, did I break your concentration? ~ |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 30 Nov 2013 03:36 PM |
I might revisit this later, though.
~ Oh, I'm sorry, did I break your concentration? ~ |
|
|
| Report Abuse |
|
|
OKevinO
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1036 |
|
|
| 30 Nov 2013 03:37 PM |
yahhh basically like that :) like bullet holes, thanks man, didnt know what you ment at first.
♫~DUBSTEP ]V[AY RULE THE WORLD~♫ |
|
|
| Report Abuse |
|
|