I amp my guitar through guitar rig, my sustain is fine up until I get passed the 12th thread. What could be causing this?

For example the notes before the 12th fret can be sustained for around 5 seconds with me just holding it normally, but every fret without fail passed the 12th will only hold for 2 seconds.

Is this a technique thing or a setup thing? thank you in advance.
sounds like too much relief in the neck. Tighten up truss rod 1/8th of a turn, wait 15 minutes, try it out again
^I strongly advice against messing with the truss rod unless you're 100% confident in what you're doing. ^

I have no idea what could be the cause of your problem. You better move this post to the Electric Guitar thread..
Sounds like the action could be too low. If there's too much tension on the strings or if the string hits frets which are higher up then the sustain will suffer.
I had the same problem a while ago. The solution was a combination of pick-up adjustment and Guitar Rig settings. The distance between the strings and the pick-ups has a big impact on sustain appearently.

Take this advice with a grain of salt because I'm no expert.
I had the same problem just a few weeks ago, took my guitar in for a set-up, problem resolved never sounded better.