object moving in world space

how do I make it so the object moves in world space when wasd kes are pressed?

Use Space.World in Translate.

–Eric

How?

here is my code:

var moveSpeed = 100.0;

function Update () 
{
	if(Input.GetButton("w"))
	{
		transform.Translate(0,0, (moveSpeed * Time.deltaTime));
	}
	
	if(Input.GetButton("a"))
	{
		
	}
	
	if(Input.GetButton("s"))
	{
		
	}
	
	if(Input.GetButton("d"))
	{
		
	}
}

Read the docs for Transform.Translate(). That should answer your question, but if not, post back with any follow-up questions you have.

I alredy did, didnt find it.

Are you sure? Unity - Scripting API: Transform.Translate It’s answered very clearly, with a code example and everything.

–Eric