Hello I'm having a mind blank not understanding what the resistor does on a RC circuit.Why is it needed since why can't the capacitor just charge off the power source. Same question applies for RL,just what does the resistor do. 
Thanks
Image of a series RC circuit
<https://www.google.com.au/search?q=RC+circuit&client=ms-android-google&prmd=ivsn&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjY9IuHscDSAhWGk5QKHcm7DG0Q_AUIBygB&biw=412&bih=604#imgrc=tLk42EXIjxhHsM>: