Playing scales really slowly over and over, ensuring accuracy EVERY time you practise will gradually fix the fingering in your memory. Also, you could try playing the scale in stages, gradually adding more notes. For instance, using C as an example, play the first 5 notes up and down, remembering where the RH thumb turns under on F ascending and where the RH 3rd finger turns on E, descending. Then you could try going up and down for just one octave.
One of the most common difficulties is the fingering around the end/beginning of each octave. Going wrong here can cause your fingering to go haywire! Is it 4 or 3? Keep your eyes on the music and not on your hands and follow the fingering rigidly, ensuring you are accurate EVERY time.
Another problem I have found with students is that, due to notes being written very closely together, looking down at their hands causes their eyes to lose their place in the music. To get around this, I have sometimes written the notes of the scale on paper, putting the RH fingering above the letter names and the LH fingering below. This has helped some students. I also think it is worthwhile to try to NOT look at your hands, but follow the notes as closely as you can and 'feel' your way through the scale. In general slow, regular practice is what will bring the best results.