[Solved] With which script can I calculate a certain height, to decrease the character's life?
Asked by
4 years ago Edited 4 years ago
So, I was creating a script that could calculate a certain height and, if the character exceeds that limit, life could decrease or remove, so, in my brilliant mind, well not totally I did it like:
01 | local player = game.Players.LocalPlayer |
03 | local char = player.Character |
07 | if char.HumanoidRootPart.Position.Y < 1000 then |
09 | char.Humanoid.Health = 0 |
I believe that this command is not the right command because, I tested it and it didn't work the way I wanted. So how can I solve this little problem?