Mexico at first did not allow the people of Texas to own slaves. After winning independence and however, Texas allowed slavery. Once slavery was allowed, after a few years of independence, texas asked to enter the US as a slave state.
So Texas went from a territory of Mexico that had slavery banned to a state in the US with slavery (after independence)
hope this helps