I'm trying to make the hands do damage to the npc but it doesn't work. I tried out different methods like a Punching script tutorial but the scripts are too messed up
local LoadAnimation = Char.Humanoid:LoadAnimation(game.ReplicatedStorage.Animation1)
script.Parent.RightHand.Touched:connect(function(hit)
if hit.Parent.Humanoid and LoadAnimation.IsPlaying == true then
hit.Parent.Humanoid:TakeDamage(2)
end
end)
script.Parent.LeftHand.Touched:connect(function(hit)
if hit.Parent.Humanoid and LoadAnimation.IsPlaying == true then
hit.Parent.Humanoid:TakeDamage(2)
end
end)
Am I doing this correctly? or should I change the LoadAnimation.IsPlaying to debounce?

6 comments
I think you should do it another way. Try making a script inside the players torso that reacts when it's touched. Make the 2 parts in different scripts. 1 script for animation and 1 script for damage.
Do I use a local script?How do I make the script go inside the player's torso??
Wait I think i got it
nevermind,I don't understand what you mean :/
You should play animations on the client and damage on the server
ok