it will come eventually, if you do it a lot...
first year freeski I was mediocre at hitting boxes and stuff, probably scared of downboxes and anything I'd have to jump on or longer than 4m...
second year I learned flatrails on first weekend (all it takes to rail is balls, I realized there), soon followed by downrails of all sorts..
that year I once went to a park with a massive railline and a shitton of rails, scary rails, high rails, kinked rails, rails you could nut yourself, uprails... I just hit everything and became really comfortable (it still is a mindgame!), by the end of the season I could do casual fs2outs, and I even stomped some switchups, did lipslides (the highlights to carry to next season)
third year I started to basically learn tricks on rails, like fs2out, bs2out, switchups, surface blind swups, four outs, some switch ons and 2 ons on tubes, unnatural sliding... everything rather sketchy, but by the end of the season I felt comfortable as fuck and had some descent shots of all my "banger" tricks, that's what they kinda were for me...
fourth year I moved out to a huge ski resort, where everything was huge, park length and the obstacles... it fucking pushes, I don't know if there's still park rails I would be afraid off, also I'm basically able to bring every trick I feel comfortable on small obstacles to bigger obstacles...
It's kind of a long way to such a point, but you see... just hold on to it, never let go, don't be scared... matter of will&time!