I got it working. Note! This might not be cheat proof.
The problem is that ApplyDamage works/runs only on the server. So I made a function the following changes.
The client tells the server he hit a player!
http://puu.sh/diaEj/7d9a90529d.jpg
The custom function replicates to Run on a server.
http://puu.sh/diaI7/6824f40a7e.png
Then, the apply damage manages the hitting stuff