If I was baptized when I was 12 just because my friends were being baptized would this be a saving baptism?
If your only reason for being baptized was to imitate your friends, then how was it different from following your friends in jumping into a pool? What gives baptism its meaning is your realization that you are being cleansed of your sins by imitating Jesus' death, burial, and resurrection.
"Or do you not know that all of us who have been baptized into Christ Jesus have been baptized into His death? Therefore we have been buried with Him through baptism into death, so that as Christ was raised from the dead through the glory of the Father, so we too might walk in newness of life. For if we have become united with Him in the likeness of His death, certainly we shall also be in the likeness of His resurrection, knowing this, that our old self was crucified with Him, in order that our body of sin might be done away with, so that we would no longer be slaves to sin; for he who has died is freed from sin" (Romans 6:3-7).
It is possible that at the age of 12 you were not truly aware that you sinned, that you were personally responsible for your own actions, and that you need forgiveness. This isn't true for everyone. Some people are very aware of their need for God at a young age. But since you indicate that your reasons for baptism weren't these things, then you may wish to consider being baptized for the right reasons.