- Home /
Question by
twoface262 · Jan 22, 2012 at 05:41 PM ·
javascriptpositionobject
Moving an object
Hello, I'm trying to set my players position back to a certain point. here is my code.
var player : GameObject;
Network.player.transform.position = GameObject.Find("Spawn").transform.position;
I set the "var player : GameObject;" to the player prefab but it gives me this error when I try to re-spawn
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object[] args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.GetProperty (System.Object target, System.String name) UnityScript.Lang.UnityRuntimeServices.GetProperty (System.Object target, System.String name) Instantiate.Die () (at Assets/Instantiate.js:19) if anyone knows whats going on please feel free to help. Thanks!NullReferenceException: Object reference not set to an instance of an object
Comment
Your answer
Follow this Question
Related Questions
Saving Object Position in Float NOT Object 1 Answer
Camera Movement (One Position to Another) 1 Answer
A node in a childnode? 1 Answer