I'm making a punch script and when the part welded to your arm touches another humanoid it says take damage is not a valid member of model
x.Touched:connect(function(hit)
print('touched')
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= plr.Name then
hit.Parent:TakeDamage(5)
end
end)
the system prints touched and I am testing the damage on a dummy

2 comments
is this a shorten version of your script? if yes then I think that the problem lies with one of your variable that has "takedamage" in it.
It should be Humanoid:TakeDamage(). You were just referring to the player Character not the humanoid.