I have a script that will make the player punch when they click. There is an If statement in the function, but it acts as if that if statement doesnt matter. here is the code:
if combo == false then
if animating == false then
animating = true
Module.Animation("Play",1226358491) -- this is playing the animation in the module script
print (Module.Animation("Get",0,"Playing")) --this is displaying if the animation is playing
while Module.Animation("Get",0,"Playing") do --this is a while loop that will repeat until the animation is no longer playing
wait(0.01)
timelength = timelength+0.01
RightHand.Touched:Connect(function(partname) -- this contacts if the part is touching anything
print(partname)
for number,value in pairs(Limbs) do
if partname.Name == value and partname.Parent.Name ~= PlayersOwnName and partname.Name ~=TouchedBefore then --this is the if statement thats giving problems
Damage:FireServer(partname,DamageValue)
TouchedBefore = partname.Name
end
end
end)
end
comby("Add")
print (MoveNumber)
animating = false
TouchedBefore = ""
end

2 comments
Ok, what's the atual problem? I didn't understand the title
the problem is that the output box says this when i punch a dummy 16:30:12.670 - Humanoid is not a valid member of Players 16:30:12.670 - Stack Begin 16:30:12.670 - Script 'ServerScriptService.EnemyDamage', Line 3 16:30:12.671 - Stack End LowerTorso (x26) UpperTorso 16:30:12.689 - Humanoid is not a valid member of Players 16:30:12.689 - Stack Begin 16:30:12.690 - Script 'ServerScriptService.EnemyD