Hello,
I’ve been doing unity for a long while now, but only the scripting part is still tricky.
I am making a kind of a PropHunt game, and i need help with my JavaScript.
I already have that when you click, you change into a object, but then you cant walk or move.
i have seen alot of other unity forums and documents, but nothing helps.
any help will be appreciated. thanks.
My script:
var player : GameObject;
var Changer : GameObject;
var AnimObject : GameObject;
var Spawn_Position;
function OnMouseUp(){
Destroy(gameObject);
Instantiate(Changer,AnimObject.transform.position,AnimObject.transform.rotation);
}
function Update ()
{
if(OnMouseUp == true){
Instantiate(Changer,AnimObject.transform.position,AnimObject.transform.rotation);
}
}