How to delete hats off a character?

Yes, it functions the same way wait() does but a different name and a slightly different function. You can research more about task library here.