I’ve managed to get my gameobject to scale, but I would like to scale it bigger over the course of lets say 1 second but I don’t know how to do that since I’m extremely new at scripting. Here’s my code
public class Enlarger : MonoBehaviour {
public GameObject Player;
void OnTriggerEnter(Collider other)
{
print("Collision detected with trigger object " + other.name);
PlayerComponent playerComponent = other.gameObject.GetComponent<PlayerComponent> ();
//checking if collided with player
if (playerComponent) {
Player.transform.localScale = new Vector3(2.0f, 2.0f, 2.0f);
Destroy (gameObject);
}
}