Answered by
0hsa 193
3 years ago Edited 3 years ago
didn't understand what you mean by cooldown, damage? clicking?
01 | local tool = script.Parent |
03 | local canDamage = false |
07 | local WaitTime: number = 0.3 |
09 | local function onTouch(otherPart) |
10 | local humanoid = otherPart.Parent:FindFirstChild( "Humanoid" ) |
12 | if not humanoid then return end |
14 | if humanoid.Parent ~ = tool.Parent and canDamage then |
15 | humanoid:TakeDamage( 5 ) |
24 | if Cooldown then return end |
27 | local str = Instance.new( "StringValue" ) |
40 | tool.Activated:Connect(slash) |
41 | tool.Handle.Touched:Connect(onTouch) |