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?
(Best Answer) Find out for me: one difference and, one similarity between Global, and Local scripts. Thank you.