You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? A simple script that detects if the player health down.
-
What is the issue? It doesn’t check if the player health goes down.
-
What solutions have you tried so far? Idk how to check if players health went down. I don’t think there is a solution.
Can someone tell me how to check if the player health went down?
But does this run on the server or client?
it runs in a localscript as localplayer can only be accessed through localscript.
How Do I make the healing script wait 5 secounds after the player takes damage?
2 Likes
SnarlyZoo
(SnarlyZoo)
#6
You do the same thing by creating a script like this if you want it server sided:
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character.Humanoid.HealthChanged:Connect(function(newHealth)
-- the code
end)
end)
end)
1 Like
do a wait and add in a while true loop and make the health go up.
you can also make the healing stop using an if statement.
Xacima
(Xacima)
#10
HealthChanged
is used for localscripts, not serverscripts.
I think you could get the humanoid’s health, and then use the .changed event