How to: Gas Coin handling

Question from Discord:

Hi can anyone help me on this
I have sui Balance in my wallet and i want to transfer a fixed amount to a receipint so i do split coins to a sui get coin of that amount but I am unable to transfer this generated coin because thats the only gas object i have
how to tackle this?

Hi, try using the txb.gas property which does some coin handling tasks for you so you don’t end up accidentally using the same coin the txn will try to use as the gas payment coin. Otherwise you need to explicitly specify the gas payment coin and the coin you are splitting from. You can read more about coin management here and an example on how to split with tx.gas here