We've had our cat for around 12 years with no problems with her at all. She had a litter tray at a couple of points in her life when she was in catteries (she was kept in a cattery for 6 months, 5 or so years ago, after a house fire we had. We were not told if she had or hadn't used the litter tray so just presumed that she had.) As we do not have a cat flap - and cannot get one- for her to get in and out of the house we normally just let her out at night and bring her back in at morning time. She is getting to be around 14 years old now so we would like her to stay inside during the night time and only go out in the day. We have bought a litter tray with the wood pellet litter and have put it hidden away in the bathroom with easy access for her (also far away from her food) i've tried showing her the tray and also rubbing her paws in it after she has eaten to show her that it is the place to go but still she will not use it meaning we still have to put her out all night after trying leaving her in a couple of nights and her scratching at the carpets to get out and go to the loo.
We have also Tried to put her out about 10 minutes before we go to bed so she can go to the toilet and then come back in and spend the night inside which doesn't work either as she just waits by the door for the whole ten minutes due to not wanting to go.

Any help would be highly helpful for the little girl.

Kind regards