All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no doubt that distorting the Hadeeth of the Prophet is a kind of lying about him, and this is forbidden. Rather, lying about him is one of the grave major sins according to the consensus of the Muslims.
The Prophet said: “Whoever tells lies about me deliberately, let him take his place in Hellfire.” [Al-Bukhari and Muslim]
An-Nawawi said in Sharh Muslim:
“Deliberately fabricating a Hadeeth is forbidden by the consensus of the Muslims, who are relied upon in regard to the consensus.”
Al-Manaawi said in Faydh al-Qadeer:
“This is a very severe threat, which indicates that lying about him [the Prophet] is one of the grave major sins, and some scholars considered it as Kufr.” Ath-Thahabi said: “Deliberately lying about him is one of the greatest sins and some scholars considered it as Kufr……” [End of quote]
Hence, if you did so out of ignorance, then we hope that you are not sinful, let alone being a Kaafir.
However, you must beware of being negligent or indifferent about such a matter in the future.
It is worth mentioning that the ruling on a Muslim that he is a Kaafir is not an easy matter; rather, there are some conditions for that which we have already clarified in Fataawa 8106 and 87963.
Many scholars forbade acting in a play (featuring), but Shaykh Ibn ‘Uthaymeen permitted it with some conditions among which is to not feature the role of the Prophets and the Companions as this may include contempt to them or degrading their status. This meaning can be found in featuring the role of the angels, so it is not permissible, but this is not Kufr.
Allah knows best.