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

How would i make it so that if a zombie hurts a player to health 5% the player drops to the ground?

Asked by 7 years ago
Edited 7 years ago

Basically how would i make a call of duty script

-- player falls to the ground and can barely move

--screen gets more red as time runs out

-- icon appears over head and appears to other players

--zombies cant kill a player fully (health cant go below 5 by a zombie)

-- player has limited time before dies

-- other players press a certain key to revive the player

--when other players press the key to revive the player it takes out a certain amount of points

--when there is a new round everyone's points to to 0

SOME TIPS ON HOW TO MAKE?

1 answer

Log in to vote
0
Answered by 7 years ago

This isn't a request site, but if you use the .HealthChanged event with your humanoid, then check to see if your health is below 5% then you can run the animation code

local player = game.Players.LocalPlayer

player.Character.Humanoid.HealthChanged:connect(function(health)
    if health <= player.Character.Humanoid.MaxHealth*0.05 then
        --when you are damaged and it brings you below 5%, run this code
    end
end)
Ad

Answer this question