Jailbreak iphone 3gs version 3.1.2?

I’ve got both iphones 3g and 3gs! I’ve been able to jailbreak the 3g phone but are having difficulty with the 3GS one! I’m using blackra1n but every time I try it, it makes the phone go blank and I have to restore it!! What am i doing wrong with this one????