Scientists have identified vitamin B12 as a key molecular signal that encodes inherited behavioral changes across generations in roundworms.