How to put a clothing prop into a Ped's hand?

In base GTA, whenever you step on/off from a bike, the ped would normally put on a motorcycle helmet or take it off.

I’m wondering if there is anyone who knows info or can give guidance on applying the same functionality but to other hats within clothing such as addon clothing, etc.

The plan is to have a command that allows players to put a hat on/off but when they do it, it’ll put the hat into their hands as they do an animation.

I’ve done some research but have failed again and again at this project, so i’m here reaching out to see if anyone has any knowledge they’re willing to share!