Cast to (insert class/blueprint name here)

When you need to cast depending on some input your class setup wrong.
Cast to is a way to tell the program “Hey game, you don’t realize it but this is actually of type X”. This is not “Hey game, morph this Apple to an Strawberry, because you know, both are Fruits”.
If you don’t know the type you need, your code makes no sense.

Read about interfaces, this is most likely what you want to use.

Or introduce a parent class which you then extend in your subtypes. Eg a parent Weapon a with child blueprints like Gun, Turret, Bazooka. This makes it easy to define generic functions (in the parent) and - if you need - you overwrite it in your subclasses.