Very hard to shift sum-times not shifting at all??

This is the second time this happened to me. The fist time i didn't drive the car for a couple of days, when i tried to put the gear in reverse it wasn't slipping into gear, it wasn't slipping into any of the gears. but when the car is switched off the gears goes in fine, after bout a hour or so i tried back and it worked normal.
This morning the same thing happened again "and made me late for work
"
what causes that???
a buddy on mines told me it could be that water/moisture got into the fly wheel and that was causing it to stick and when the water drys off it'll work like normal again. is that true
what do yall think? has it ever happened to any of yall?
This morning the same thing happened again "and made me late for work

what causes that???
a buddy on mines told me it could be that water/moisture got into the fly wheel and that was causing it to stick and when the water drys off it'll work like normal again. is that true

what do yall think? has it ever happened to any of yall?