generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: HELP with TargetSurface!!! PLEASE

Previous Thread :: Next Thread 
OKevinO is online. 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 is not online. 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 is online. 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 is not online. 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 is online. 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 is not online. 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 is not online. 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 is online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image