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
3 years ago
Edited 3 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:

local player = game.Players.LocalPlayer

local char = player.Character

while wait() do

    if char.HumanoidRootPart.Position.Y < 1000 then

        char.Humanoid.Health = 0

    end

end

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 — 3y
0
Haha thank you, I got what I wanted, I've put together the necessary script, thanks for the feedback. Games_DBZ -15 — 3y

Answer this question