Ah sorry, forgot you're using C-script instead of Lite-C smile

First of all:
Code:
entity ghostobject
{
	flags = TRANSLUCENT;
	alpha = 30;
}


This creates a view entity, but you want a "normal" entity , not a view entity, so replace that code with this:
Code:
entity* ghostobject;


Change the while condition ( "while(isplaceobject == NULL)" ) to "while(isplaceobject != 0)", as it's a variable, not a pointer, and set this variable to something else than 0 before entering the while loop - this way you can always cancel the loop by setting the global variable to 0 anywhere in your code.

In this code:
Code:
if(mouse_left)
		{
			ent_create("crate.mdl",target,null);
			if(ghostobject == NULL)
			{
				ent_remove(ghostobject);
				isplaceobject = 0;
			}
			
		}


You need to change the nested if-condition to "ghostobject != NULL".

And now a very important part:
Code:
if(ghostobject == NULL)
		{
			ghostobject = ent_create("crate.mdl",target,NULL);
		}
		else
		{
			vec_set(ghostobject.x,target);
		}


You need to change it to this:
Code:
if(ghostobject == NULL)
		{
			ghostobject = ent_create("crate.mdl",target,NULL);
			ghostobject.transparent = on;
			ghostobject.passable = on;
			ghostobject.alpha = 30;
		}
		else
		{
			vec_set(ghostobject.x,target);
		}


You really need to make it passable in order to let the trace ignore the ghostobject.

Tell me if it's still not working smile