|
| 23 Jul 2012 12:25 AM |
function onTouched(hit) if hit.Parent == script.Parent.Parent.Location1 then print("HIT LOC1") end
if hit.Parent == script.Parent.Parent.Location2 then print("HIT LOC2") end
end
script.Parent.Touched:connect(onTouched)
I'm trying to get it so it'll print the respective messages if the thing script.Parent touched is those respective objects. Can some reformat this for me so it actually works? |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2012 12:28 AM |
script.Parent.Touched:connect(function(hit) if hit.Parent == script.Parent.Parent.Location1 then print("HIT LOC1") else print("HIT LOC2") end end) |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 23 Jul 2012 12:29 AM |
Is this related to your problem with making a moving platform with a consistent speed? If so, please check that thread. If not, then try checking if hit is Location1.Part, or use an invisible brick maybe .1 studs out of the wall and try detecting that. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2012 12:34 AM |
It is about that. I kind of posted this in a rush and didn't take a look at my other thread.
~http://www.roblox.com/Castle-in-the-Sky-place?id=75647812 |
|
|
| Report Abuse |
|
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 23 Jul 2012 12:38 AM |
| Did my suggestion make you pause for a moment and contemplate headdesking? I ask because that would be my response in that situation. |
|
|
| Report Abuse |
|
|