0

# How to make if player get damage above 15 then take ragdoll or animation?

Hi. I trying to make it, but my level of scripting bad(My English is poor..sorry)

0
https://idownvotedbecau.se/noattempt please make an attempt TTChaos 750 — 14d

0
Edited 13 days ago

You first need to find the value of the player's health to see when he takes more than 15 points of damage. The Humanoid has a property of Health and MaxHealth, MaxHealth simply means whats the max health the player can have, the health shows how much health the player has.

--Everything is in a local script inside StarterPack.

--We find the humanoid.
--We find when the player lost more than 15HP.

local player = game.Players.LocalPlayer
local humanoid = charcter:WaitForChild("Humanoid")

humanoid.HealthChanged:Connect(function(health) --Health gives us whats the current humanoid's health.
if health <= 85 then --<= means less or equal to 85, if our health is less or equal to 85 then it means we either got 15 damage or more than than.
print("took more than 15 or 15!")
else
print("took less than 15") --If we didnt take 15 or more points of damage it gives us this.
end
end)


This has to be in a local script and place it in StarterPack Also when youre putting a ragdoll script, remember it has to be a server one, so try to add it with remote events somehow, if a ragdoll script you have/found has an event simply add that even here so it fires it from here. You can add animations right here in a local script, it will still work and everyone else will see the animation, unlike the ragdoll.

0
it dont work/. monus20022 0 — 14d
1
What did you do and where did you put the script? What errors did you get? RoiGipot 1 — 14d
0
Sorry for the long absence, the script was uploaded to StarterPlayerScripts. No errors came out. monus20022 0 — 13d
0
Sorry for the long absence, the script was uploaded to StarterPlayerScripts. No errors came out. where it was necessary to enter ragdoll or animation, I entered Print("work"), but it dont work. monus20022 0 — 13d