I want to make a local script where the player has damages on his legs(Its not to damage him self but others)

Can any one tell me how to do it? and how does it loop?(Ik while wait() but still i want to learn from others)