i am making a MMORPG game but the swords doesnt seem to work here's the Local Script
local animations = {"5283426957","5283485401","5283529976"}
local CanAttack = true
script.Parent.Activated:Connect(function()
if CanAttack == true then
local animation = Instance.new("Animation", script.Parent.Parent)
animation.AnimationId = "http://www.roblox.com/asset?id="..animations[math.random(1, #animations)]
local chosenanim = script.Parent.Parent.Humanoid:LoadAnimation(animation)
chosenanim:Play()
CanAttack = false
wait(1.5)
CanAttack = true
script.Parent.CanDamage.Value = true
end
end)
and here's the normal script
script.Parent.Blade.Touched:Connect(function(p)
if script.Parent.CanDamage.Value == true then
script.Parent.CanDamage.Value = false
p.Parent.Humanoid:TakeDamage(25)
end
end)
i have a boolvalue in the tool that is turned off

2 comments
how?
i already put p.Parent:FindFirstChild("Humanoid") what should i do next?