Obtaining Hat IDs from the HumanoidDescription

It appeared you had figured that out–You can look at the HumanoidDescription.HatAccessory
(It can have multiple; comma-separated.)

Yes, getting AssetIds from the Character is a problem, but from HumanoidDescription should be fine.

You also don’t even need the Player in the game, you can use:

or

You also may want to look at this: