|
| 31 Dec 2013 04:50 AM |
| What variables would be needed for an object to interact with another object? For example, a pickaxe reacts with a block of stone. |
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 04:59 AM |
All I am going to do is raise an eyebrow... Do you mean function? If so you may want a hit function if the pickaxe collides with the stone.
object.Touched:connect(function (hit)
end) |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 31 Dec 2013 04:59 AM |
You'd grab the players mouse from the tool (the pickax), and then you'd say
if mouse.Target.Name == "Stone Block" then -- do stuff end
|
|
|
| Report Abuse |
|
|
|
| 31 Dec 2013 07:18 PM |
| Holy hamballs. Thanks guys. |
|
|
| Report Abuse |
|
|