Error message in console after weapon hex?

I did a few weapon hexes today, and almost all worked, but two or three of them wouldn’t spawn and spat out this error message in the console:

[@gamemodes\sandbox\gamemode\commands.lua:126] Tried to use invalid object (type IPhysicsObject) (Object was NULL or not of the right type)

in teal text. Help?