Help for bug of camera script and Idle of tool gun

Hello! I try to make a guns for my game, they has a camera script on character scripts.
The Issue it is because some times the Idle of the gun bug and keep like bugged, here a video…