Hello, I'm trying to make a script which checks your health and if it equals to zero, it would write your health in the chat.
Code:
Code:
function health()
if getElementHealth(localPlayer) == 0 then
outputChatBox(getElementHealth(localPlayer))
else
outputChatBox("Your Health is above 0.")
end
end
But it doesnt really do anything.
I have already tried adding the next line under the last end:
health()
But sadly, didn't work.
Thank you if you help me!