Cant figure out how to make someone sit when they are on low health. Im a beginner at scripting but been building a pretty long time. Im trying to make it where when they get 10% health they will sit down and when they get 20% health they get back up. I tested it and it wont seem to work. Anything i should change?
game.Players.LocalPlayer.Character.Humanoid.HealthChanged:connect(function() game.Players.LocalPlayer.Character.Humanoid.Health / game.Players.LocalPlayer.Character.Humanoid.MaxHealth * 10 if game.Players.LocalPlayer.Character.Humanoid.Health/game.Players.LocalPlayer.Character.Humanoid.MaxHealth <= 0.1 then player.Humanoid.Sit = true if game.Players.LocalPlayer.Character.Humanoid.Health/game.Players.LocalPlayer.Character.Humanoid.MaxHealth >= 0.2 then player.Humanoid.Sit = false end end end)
Cant figure it out, if you want a idea of the script check out rrp2, when you lose damage u will go into a "injured" thingy which is what Im trying to script. Just ask someone to punch you or something in game.
Game im trying to make script like.

2 comments
plz use block code, thats the only way i help people xD
my gosh im try gonna even try to read that without a code block