I'm pretty unsure why I've been getting this error, I even printed it out and it returned Humanoid, so why am I getting this error?
game.Players.LocalPlayer.Character:WaitForChild("RightHand").Touched:Connect(function(hit)
if playAnim.IsPlaying then
print(hit.Parent:FindFirstChild("Humanoid"))
if hit.Parent:FindFirstChild("Humanoid") and not debounce and not beenDamaged and hit.Parent ~= player.Humanoid then
if player.Character.Humanoid.Health > 0 then
beenDamaged = true
replicatedStorage:WaitForChild("Punch"):FireServer(hit.Parent.Humanoid)
end
end
end
end)

1 comment
Thanks!