Help! I Have a problem! My sword only deals damage once. What happened?
Ok, So. My sword only does damage once, When I swing it again, It doesn't do any damage any more. Here is my script.
Script:
1 | script.Parent.blade.Touched:connect( function (p) |
2 | if script.Parent.CanDamage.Value = = true then |
3 | script.Parent.CanDamage.Value = false |
4 | p.Parent.Humanoid:TakeDamage( 15 ) |
Local script:
03 | script.Parent.Activated:connect( function () |
04 | local Idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) |
05 | local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) |
10 | script.Parent.Activated:connect( function () |
11 | local Idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) |
12 | local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) |
14 | if CanAttack = = true then |
22 | script.Parent.CanDamage.Value = true |
Can you help me?