You will have found that it is impossible to trace over all of the diagonals of a hexagon without going over the same line twice. Why is this? The trick is to look at how many diagonals are connected to each vertex. Jenni offers us a very clear explanation:
Each time you draw a line IN to a vertex, you also need to have another line going OUT (unless you are on the end point). If there is an even number of lines, then you will always be able to go in and out of any vertex without using the same line twice. However, if you have an odd number of diagonals connected to each vertex, then sooner or later you will revisit a vertex and find that there are no more available lines going out of it.
Thank you, Jenni.
Can you see that this will always be possible for shapes with an odd number of sides, because they always have an even number of diagonals connected to each vertex? On the other hand it would never be possible for any shape with an even number of sides, for the opposite reason.