Error: Signature verification failed

I have a code that sometimes works…but most of the time sends a

Error: Signature verification failed at Transaction.serialize

whenever i try
web3.sendAndConfirmTransaction(connection,transaction,[LPWallet,toWallet] )