Desde que você mencionou a lua, eu suponho que você está se referindo ao Sentinel Prime no filme "Transformers 3: Lado Negro da Lua" (existem vários personagens chamados Sentinel Prime ao longo das várias continuidades).
Spoilers, apenas no caso de
In the Michael Bay universe, a Transformer only requires a few seconds to scan & imitate a vehicle. When Sentinel is first found and then later awakened, we see only his robot form. Later, when we first see his vehicle form (a red fire truck), he has been on Earth for at least two days - possibly longer - while working with The Autobots and NEST. Since the fire truck form he uses is of a military variety, we can safely assume that Sentinel scanned one of the NEST emergency response vehicles to use as a disguise, an event which occurred off-screen during the timeframe in which Sam & Seymour attempt to crack the mystery surrounding the moon landing.