In this question I was given part of a script and told to attach it to my player. There are no errors, but the script doesn’t seem to do anything. Here it is:
var DeathSpeed : int;
function Update(){
}
function OnCollisionEnter(collision : Collision)
{
if(collider.relativeVelocity.magnitude > DeathSpeed)// where "someValue" is a variable of your choosing.
{
Debug.Log("DEAD");// You'll have to implement how the player will die, yourself, but just call the function(s) needed to kill them, here.
}
}
Can anyone help?