that's really ez if you know how to use triggers
so most of all, hat is a custom decor, map makers can have the ability to attach a decor to a gun via triggers, so first of all, add a custom decor that's flipped into the front and a gun like this:
make sure when you add a trigger, you must set that trigger on infinite calls, also to activate that trigger you need to add a timer with 0 delay and an infinite loop:
then, you gonna start to use triggers, and this is the trigger that you need to attach the decor to a gun:
if you had any problems just report
also tell me if you want an open source
anyways the next step are only 2 steps i guess to make that look like a hat attached to a head
so you gonna need to fix the offsets:
then you need to fix the hat where it gets attached once you held the gun, use that trigger:
this trigger will fix the gun attachment, if you wanna change the gun to be attached on your leg, or on your head:
on the back = 1
on the leg = 0
on the head = 2