(LOS ANGELES) -- Mila Kunis worked with Robin Williams in the 2013 film, The Angriest Man in Brooklyn.
Before he died, she recalled first meeting the actor when she was a teenager starring in That '70s Show.
"So many times you meet people they don't impact you. You meet them and they're gracious and they're nice," she told Esquire, "and then there are sometimes when you meet somebody and they say one thing and for the rest of your life you carry that one thing and they don't even know that they impacted your life."
Kunis, 31, explained that Kurtwood Smith, her co-star on the sitcom, was friendly with the late comedian. One day, they saw him on set, and Williams asked Kunis her name. When she introduced herself and told him she was involved in the teen series, he gave her a piece of advice she never forgot.
"He said, 'Remember this moment. Remember this because things like this don't happen very often. Remember this time.' Having somebody of Robin Williams' stature tell me to just acknowledge something meant so much," she said. "He didn't mentor me. He just said, 'Step back and appreciate this. You're having an amazing time.'"
The actress said that when they reunited for their movie years later, she reminded him of the moment and what he told her.
"He said, 'It stands true. Today, right now, at this very moment, step back and appreciate it," she said. "And I went, 'OK.'"
Copyright 2014 ABC News Radio