Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

shoot script is not working

$
0
0
this is probably a stupid question but i cannot get my shoot script to work. i am a noob to scripting and this is the first script that i have worked on. it is supposed to spawn a rigidbody game object with force in a direction from a empty object when i left click. here is the script var bullet : Transform; function update () { if(input.GetMouseButtonDown(2) Instantiate(Bullet,transform.position, Quaternion.identity); Bullet.rigidbody.AddRelativeForce(transform.forward * 15); } and it is giving me this error. BCE0044: expecting ), found 'Instantiate'

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>