Get an entity's weapon class?

When weapon entities are on the world they are called spawned_entity. I wanted to get the weapon’s entity name.

For example, I used print( LocalPlayer():GetEyeTrace().Entity:GetClass() ) thinking I’d get something like weapon_crossbow, instead it’s spawned_entity.

Is there a way to figure out the weapon’s class name?

One of your addons does that.

Is the weapon on the ground or in your hand? If it’s on the ground, pick it up and do PrintTable(LocalPlayer():GetActiveWeapon())

That wouldn’t work. Why use PrintTable? Player:GetActiveWeapon() doesn’t return a table, it returns the weapon entity. Additionally, that wouldn’t give you the weapon class anyways. You would need to use Player:GetActiveWeapon():GetClass() for that. Nevertheless, this is only if Winter wants to use the method you suggested though, which I don’t think he does. I think he’s trying to get the class of a ground entity instead.