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

How Do I Make A 'Death From Certain Height' Script?

Asked by 4 years ago

I've tried using altitude, Enum.HumanoidStateType, e.t.c. I've given up. I don't know how to make a script that damages a player from a certain height!

1 answer

Log in to vote
0
Answered by 4 years ago

Well, just check when the BodyHeightScale changed, and if it's higher than you want, it kills. Something like this:

-- this have to be on a serverscript tho, so do it in the onserverevent where you change height
player.Character.Humanoid.BodyHeightScale.Changed:Connect(function()
    if player.Character.Humanoid.BodyHeightScale.Value >= 2 then -- determine a value here
        player.Character.Humanoid.Health = 0
    end
end)

Something like this, hope i helped.

0
im going to try it AlphaWolf536791 28 — 4y
0
hmm... probably would have worked... if i was doing a player height cap. i meant altitude by height not player height AlphaWolf536791 28 — 4y
0
Can you explain me what do you use for making player bigger? EternalScythe 222 — 4y
Ad

Answer this question