Code challenge?

Ive spent the last few weeks around lua after moving on from a long time with visual basic.
im getting the hang of lua. Im not super fluent. Ill probably call myself an amatuer or just under it xD

I feel this would be useful for everyone. Can someone post some kind of basic coding ideas. Eg you have to code something that finds the players health and when its at 10 kill them.
Everyone post their results in the replies?
everyone post ideas in the replys…
this is not a code request thread!!



hook.Add("Think", "IReallyWantToFindABetterHookForThisKindOfStuffButOkay", function(ply)
if ply:Health() < 10 then
ply:Kill()
end
end)


That hook doesn’t have any player arguments. Or any arguments at all.

I think the hook you’re looking for is EntityTakeDamage?

why not spawn them with 10 less health?

He was using an example of how to target the player like that.