This is the script im using
local sword = script.Parent
local canAttack = true
local canDamage = false
function onTouch(part)
local character = part.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player then
if canDamage == true then
character.BoarHumanoid:TakeDamage(2)
end
end
end
sword.Blade.Touched:Connect(onTouch)
function Attack()
local attack = sword.Parent.Humanoid:LoadAnimation(script.SwordSlash)
if canAttack == true then
attack:Play()
canAttack = false
canDamage = true
wait(1)
canDamage = false
wait(0.25)
canAttack = true
end
end
sword.Activated:Connect(Attack)

4 comments
Put a print inside the onTouch() function and playtest, and see if it prints. If it doesn't, that means you're gonna have to make custom hitboxex or something that makes it easier to hit,
Okay Let me try that
It prints but still nothing is going on
its giving me the error: Blade is not a valid member of Tool "Workspace.Tool" But I have a part called Blade in the tool so idk?