You can have this transparent problem without scripting.

When you edit the skin settings in MED and make the skin 32 bit, or when you edit the material setting and set an alpha value youre making your entity transparent and thats exactly how it looks like.