Ok Guys I'm Trying To Make Like A Left 4 Dead 2 Game, But I Only i want to ask is how you can make a reanimate player, like if the player have health in 0, The player will stay down on the floor , and he have a countdown, if the countdown finish the player will die.
But he can be saved by a player, if you keep the e prized you can reanimate it.
If You Don't know what i'm saying. Send me a message and then i'm gonna tell you.
the easiest way would be to have a threshold number for the health of the player, in which should the player cross, will restraint his movement, make him invincible and say, force him to crawl on the ground and give him a countdown. This threshold does not need to be > 100, since u can alter the player's max health(but will of course have to be below the player's max health); a little something like this:
place in StarterPack
game.Players.LocalPlayer.CharacterAdded:Connect(function(char) wait(.1) -- wait for humanoid to exist local hum = char.Humanoid hum.MaxHealth = 105 -- im setting my threshold to 100, but u should set urs to be above the most damage ur character could possibly take in one instant to prevent him from dying after taking damage hum.Health = 105 hum.HealthChanged:Connect(function(hp) if hp <= 5 then hum.WalkSpeed = 1 -- do this while playing a down animation lol local ff = Instance.new("ForceField", char) -- this is my method of making the character invincible since i dont wanna spend so much time scripting sry! wait(5) -- countdown hum.Health = 0 -- kill him; and im sorry i did not make a save function but if u want one pm me end end) end)
Closed as Not Constructive by DinozCreates, TheluaBanana, xPolarium, and Gey4Jesus69
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?