Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Detection of Humanoid animation not working?

Asked by 6 years ago
Edited 6 years ago
game.Players.LocalPlayer.Humanoid.Swimming:Connect(function()
    game.Players.LocalPlayer.Humanoid:TakeDamage(100)
end)

For some really odd reason, this script doesn't work.

1 answer

Log in to vote
2
Answered by 6 years ago
game.Players.LocalPlayer.Character.Humanoid.Swimming:Connect(function()
    game.Players.LocalPlayer.Character.Humanoid:TakeDamage(100)
end)

The player's Character holds the Humanoid, not the Player itself.

0
oof hellmatic 1523 — 6y
Ad

Answer this question