Lem0nzz2
|
  |
| Joined: 03 Jul 2014 |
| Total Posts: 211 |
|
|
| 01 Jan 2015 10:37 AM |
I want a target to takedamage, so I'd have to have the player touch the RightArm of the player that's punching, kicking etc. So how would I connect a touched event when a target touches a player?
User.Character.Torso["RightArm"].Touched:connect(function() end)
Something like this too?
mouse.Target.Touched:connect(function(hit)
mouse.Target.Humanoid:TakeDamage(20)
end) |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 01 Jan 2015 10:58 AM |
| your pretty vague, but if you define User and mouse then yeah those should work |
|
|
| Report Abuse |
|
|
SLY3
|
  |
| Joined: 10 Jul 2008 |
| Total Posts: 1700 |
|
|
| 01 Jan 2015 11:59 AM |
mouse.Target.Humanoid wouldn't work, since a Humanoid would NEVER be inside a part, only a model (the player)
So use mouse.Target.Parent.Humanoid |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Jan 2015 12:02 PM |
Right Arm is located directly in Character. You can only using RightArm when referring to the Humanoid to reference the Right Arm. So: User.Character["Right Arm"] or User.Character.Humanoid.RightArm; |
|
|
| Report Abuse |
|
|