I am writing a story where the MC is a slave in the American revolution and i plan to have a romance between him and a woman meets while he is stationed in a village as a slave soldier trying to earn freedom and i really need to know what would happen if they had a child or if it was found out they were dating or intimate in a way(This is a copy and paste someone suggested to ask this question on here instead and i don't wanna rewrite this)
Slave soldier? As in a slave serving in the army? Typically they didn't serve in soldierly capacities if they were slaves. Free blacks (whether they were free or runaways) served on both sides of the war, though you saw them as soldiers more often than on the British, who typically used blacks for auxiliary roles.
Generally, it depends on where this takes place, as each colony has its own laws, including for interracial relationships and sexual intimacies, etc, and also depends on the status of two involved. Enslaved parents creates a problem for the status of the children, as usually the status of the mother means whether the children are free or not, enslavement extended to children if their mothers were enslaved. Children from white mothers tended to complicate things. Virginian courts in the late 17th century tended to punish with fines for fornication -though they did that whether relations were mixed or not.- and by the 1690s, the colony passed a law forbidding mixed marriage between blacks and whites with a banishment from the colony (though later changed to 6 month prison sentence). Maryland passed similar laws against miscegenation and relations between white women and black men, with fines as well as making the women indentured servants to the master and enslavement of the children. The only way for the children to be free was if both parents were free. Strangely, a lot of the laws tended to affect the white women, not so much black men. These laws were common in both North and South.
There is also the factor of class and social standing. While most people tend to think of mixed children stemming from white plantation owners and black women, it wasn't always the case. Court records and runaway adds often show pairings of poor indentured servants with enslaved blacks. Mixing was socially frowned upon in most of colonial society, if not illegal. Mixed couples were at risk of being harassed However, relations between a white man and black women didn't seem to stir the pot as bad as the opposite -though it wasn't exactly ideal either.
In short for your story: likely not a very good outcome for the two.
So hopefully this gives you some ideas.
Here's a good article on this. And the guy's dissertation is muuuuuch more in depth.