You have to begin recording with the toggle key,
build / select colors using the keyboard controls (doesn't detect placement by mouse),
stop the recording with the toggle key, and then
use the playback key to repeat the actions.
You should also make sure, like they said, to face the same general direction the entire time while both recording and playing back, or the same actions will be moving the ghost brick on a different axis than intended.