Using weapons.GetStored to get a weapons model


I’m currently making a NPC Shop, I’m trying to make it so that when a item/gun is hovered in the shop a DModelPanel shows up with the model of the hovered item, I’m wanting to do this without setting the model for every item that gets added to store, and wondering whether it’s possible to get the model to show by using weapons.GetStored and using the entities name to get the model?

Tried something like item:SetModel( weapons.GetStored( “entity_name” ) ), but of course that wouldn’t work as it gives this error:

 bad argument #1 to 'ClientsideModel' (string expected, got table)

Did I explain this in a confusing way?

You need to target the model variable, GetStored is the table. The key you’re looking for is “WorldModel”. Also, I would use weapons.Get for proper inheritance in the case WorldModel isn’t set in that weapon.