Board Thread:Questions and Answers/@comment-75.70.66.206-20130606190903/@comment-10703376-20130703215335

I understand your question, as I had trouble learning turtles myself. The following command will allow the turtle to attack mobs:

while true do

   sleep(0.1)

   turtle.attack

end

The [sleep(0.1)] is required to function, because it adds a 0.1 second delay, making the looping command complete.

NOTE: You don't need the spaces in front of [sleep(0.1)] and [turtle.attack]