When typing a /tp command in a command block, you can only type in an X coordinate to teleport to before typing a space, in which the X coordinate becomes red, indicating it is not recognized.
Essentially, I tried typing in coordinates for a location I wanted to TP to, but I could only type in the X coordinates because after making a space (to type in the Y coordinates), it assumed that I was typing the direction. The command couldn't use only the X coordinate, but to make it usable I had to use the preset Y and Z, which wasn't where I wanted to teleport.
Related issues
duplicates
Comments

Duplicate of MC-124137
what commad are you using?
example of correct command:
/tp @p 0 0 0