|
| 17 Mar 2013 09:46 PM |
How can I get the player that touched a brick with an OnTouch script in it?
|
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 17 Mar 2013 09:49 PM |
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local playa = game.Players:GetPlayerFromCharacter(hit.Parent) --code blah blah end end)
|
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 17 Mar 2013 09:52 PM |
nop. NPCs wil keel ur skript.
script.Parent.Touched:connect(function(Player) Player = game.Players:GetPlayerFromCharacter(Player.Parent) if(Player)then -- code end end) |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2013 09:59 PM |
What top said.
Miz's would work, but if a bullet touched it, it might break.
~One must risk everything to find the truth. Even if the truth isn't what you want it to be, it is better than living a lie.~ |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 17 Mar 2013 10:00 PM |
Not a bullet, something like a walking AI shop with a Humanoid in it. o: Most bullets won't fire the Touched event. |
|
|
| Report Abuse |
|
|
| |
|