I already have the local script with the animations and all and it's working perfectly fine. But for the damaging part (when the sword touches an player) it's supposed to damage them but it's not working. Here is the script:
candamage = true
script.Parent.Touched:Connect(function(toucH)
local f = toucH.Parent:FindFirstChild("Humanoid")
if f and candamage == true and script.Parent.Parent.swingdmg.Value == true then
candamage = false
f:TakeDamage(20)
wait(1.2)
candamage = true
end
end)
What's supposed to happen is I only want the other player to be damaged ONLY when I swing the sword. So I put a bool value, and the swinging animation works but the other player does not take DAMAGE at all.
Any help?

2 comments
It is my boolvalue that's messing everything up but I don't understand why. The local script with the animations and all changes the bool value to true then false after 1.2 seconds. In my script it says that IF the bool value is true then it will damage the other person but it's not damaging them? Any help :(
Can you add the bit of code where you change the value to true?