|
| 23 Sep 2014 05:30 PM |
i got a interaction part that once you touch it, it does my event, now what i need help with is finding the player who touched this
thanks |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2014 05:31 PM |
part.Touched:connect(function(p) if p.Parent:FindFirstChild("Humanoid") then plr = game.Players:GetPlayerFromCharacter(p.Parent) end end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 23 Sep 2014 06:49 PM |
This is faster (albeit practically negligibly) and shorter to type out:
part.Touched:connect(function(p) if p.Parent:FindFirstChild("Humanoid") then plr = game.Players[p.Parent.Name] end end) |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2014 07:02 PM |
part.Touched:connect(function(p) if not p.Parent:FindFirstChild("Humanoid") then return end plr = game.Players[p.Parent.Name] end)
4 lines #Rekt |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 23 Sep 2014 07:16 PM |
| 119 characters vs. 130 characters. I win. |
|
|
| Report Abuse |
|
|
| |
|