Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Why is this script now working?

$
0
0
This is really getting on my nerves. I can't figure out where the problem is! It's supposed to destroy a coin when the player collides with it but it doesn't, the player collides with it and nothing happens (The coin is still there). #pragma strict var player : Transform; function Start (){ } function Update () { } function OnCollisionEnter(collision : Collision) { if(collision.transform == player); { Destroy(gameObject); } }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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