|
| 13 May 2017 08:34 PM |
this is to do damage, but it just plays the animation, and does 0 damage
local attackanimation = script.Parent.Parent.AttackAnimation local attackanimtrack = script.Parent.Parent.Humanoid:LoadAnimation(attackanimation) local attackanimdebounce = script.Parent.Parent.AttackValue.Value
script.Parent.Touched:connect(function(object) if attackanimdebounce == true and object.Parent:FindFirstChild("Humanoid") then object.Parent:FindFirstChild("Humanoid").Health = object.Parent:FindFirstChild("Humanoid") - 10 attackanimtrack:Play() script.Parent.Parent.Humanoid.WalkSpeed = 0 attackanimdebounce = false wait(2) script.Parent.Parent.Humanoid.WalkSpeed = 16 attackanimdebounce = true end end) |
|
|
| Report Abuse |
|
|
pexf
|
  |
| Joined: 02 Nov 2013 |
| Total Posts: 1195 |
|
|
| 13 May 2017 09:01 PM |
you forgot to put .Health after ("Humanoid") on this line
object.Parent:FindFirstChild("Humanoid") - 10
|
|
|
| Report Abuse |
|
|
|
| 13 May 2017 09:12 PM |
just use TakeDamage(10)?
"Got my cup of Coffee" |
|
|
| Report Abuse |
|
|
| |
|