- Home /
Problem on load level on collision
In my game there is a acid pool and theres a invisible plane under it theres a script on the plane to load the same level that the player is. but when i hit the plane it doesnt loads the level ive tried other scripts but they always dont work. im usig a character controller.How i can fix that?
im a little new to unity so i dont nkow much about it.
Answer by HailTheGreatWolf · Mar 03, 2013 at 04:21 PM
Are you detecting the collision via tags? If so make sure the plan is tagged.
Answer by faramicool · Mar 04, 2013 at 04:07 PM
you should try using Function OnTriggerenter
like:
var level : String;
var audio : AudioClip;
Function OnTriggerEnter {
Application.LoadLevel(Level);
audio.PlayOneShot (audio);
}
im still with the problem ): what im trying to do is to reload the same level that im playing. i think its because im in the same level that the script wants to load. but when any object collides with the plane it loads my level. it think its a collision problem
Your answer
![](https://koobas.hobune.stream/wayback/20220613093735im_/https://answers.unity.com/themes/thub/images/avi.jpg)