How do you attach trailers in mp as cant work it out

so i spawn a truck , i spawn a trailer i line them up and click attach but it does nothing ive seen others do it so is there something im missing