Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.