Can i use the っ to replace the ん in こんにちは, it would still be konnichiwa right? If i can't then please explain to me why.
This is why you shouldn't rely on romanization while learning Japanese phonology. Looking through the lens of romaji, っ and ん may certainly seem to do more or less the same thing: きっさ kissa, はっぱ happa, あんな anna, and ぐんま gumma (the last one may vary according to the practice). This is because romaji aims to make Japanese pronunciation friendly to those who read Roman alphabet, and not to reflect its internal mechanism.
The truth is, っ and ん represent their own, what is called "moraic phoneme", respectively.
- っ: moraic obstruent //Q//*
- ん: moraic nasal //N//*
Confusingly, they don't have single fixed sound values on their own, but have different realization depending on what comes after (or lack thereof), as in below (or see this answer for deeper analyses):
新 しん shin //ɕiN// [[ɕĩ ~ ɕĩɴ]]
新米 しんまい shimmai //ɕiNmai// [[ɕĩmmɐi]]
新年 しんねん shinnen //ɕiNneN// [[ɕĩnnẽ(ɴ)]]
新型 しんがた shingata** //ɕiNgata// [[ɕĩŋŋɐ(~ ɡɐ ~ ɣɐ)tɐ]]
The cheat sheet is that when you see m or n doubled in romaji, it represents ん + [next consonant], and everything else doubled is っ + [next consonant]. So konnichiwa never stands for こっにちは. こんにちは can never be spelled こっにちは. And こっにちは does not exist as a word.
Then is こっにちは unpronounceable? Not necessarily. Such kind of combination does exist in colloquial Japanese and is actively used. But I doubt if there is any romanization method that can transcribe it, because they're never expected to appear as long as you speak in "good grammar", so far.
Incidentally, I can probably show their contrast if I can assume you speak Vietnamese. A Vietnamese phrasebook for Japanese tourists by Vietnam Airlines gives the pronunciation ヴィエッナーム for Việt Nam, while チュエンヴィエン for chuyên viên. Thus I can say that replacing こんにちは with こっにちは would be as different as that of viên + nam with viêt + nam.
*: In academic literature, they are likely printed in small caps; if your environment supports them: //ꞯ// and //ɴ//
**: Note that even romaji does not write it "phonetically" like *shinggata, because it is natural in European languages that an n followed by g changes into ng sound.