LV1Z
|
  |
| Joined: 23 Jul 2011 |
| Total Posts: 652 |
|
|
| 16 Sep 2013 08:48 PM |
So a raycast hits a player and the player takes damage blah blah
but when the player hits the other player and it's health == 0 this following portion of the script would not execute:
if mouse.Hit == hum then if hum.Health <= 0 then if player.leaderstats then player.leaderstats.Kills.Value = player.leaderstats.Kills.Value + 1 local dead = game.Players:getPlayerFromCharacter(hum.Parent) dead.leaderstats.Deaths.Value = dead.leaderstats.Deaths.Value + 1 end end end
ignore variables, assume that you them pls |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 08:52 PM |
| mouse.Hit == hum--isnt hum Humanoid? |
|
|
| Report Abuse |
|
|
LV1Z
|
  |
| Joined: 23 Jul 2011 |
| Total Posts: 652 |
|
| |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 16 Sep 2013 11:01 PM |
Mouse.hit returns a CFrame value. Mouse.Target returns the part is hit, which can not be a humanoid since it's not visible in workspace. It would be torso or something. |
|
|
| Report Abuse |
|
|
LV1Z
|
  |
| Joined: 23 Jul 2011 |
| Total Posts: 652 |
|
| |
|