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

[Solved] With which script can I calculate a certain height, to decrease the character's life?

Asked by
Games_DBZ -15
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:

01local player = game.Players.LocalPlayer
02 
03local char = player.Character
04 
05while wait() do
06 
07    if char.HumanoidRootPart.Position.Y < 1000 then
08 
09        char.Humanoid.Health = 0
10 
11    end
12 
13end

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?

0
You talk in a really flowery way, lol CDXKIE 130 — 4y
0
Haha thank you, I got what I wanted, I've put together the necessary script, thanks for the feedback. Games_DBZ -15 — 4y

Answer this question