I,m trying to give scaling effect for a text in unity.scaling script works good.but i need to limit the effect after a particular time.can anyone hepl me?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Scale1 : MonoBehaviour

{

// Use this for initialization
void Start()
{
 

}
// Update is called once per frame
void Update()
{
    transform.localScale = new Vector4(Mathf.PingPong(Time.time / 50, .02f) + .2f, transform.localScale.x, transform.localScale.y / 10, transform.localScale.z);

 
}

}

Hey, I hope this can help. Attach this to a empty GameObject, then add your target text to the public text variable, then your good to go!

using UnityEngine;

public class TextIncreaser : MonoBehaviour {

    // The text which you want the effect to apply to
    public Transform text;
    // The speed of the animation
    public float animationSpeed = 0.5f;
    // The maximum scale of the text effect
    public float maxSize = 3;
    // The minimum scale of the text effect
    public float minSize = 1;

    // Is the animation increasing or decreasing the size?
    private bool increaseSize = true;

    private void Update()
    {
        // If the animation is increasing the text size...
        if (increaseSize == true)
        {
            // Increase the size
            text.localScale += new Vector3(1 * animationSpeed * Time.deltaTime, 1 * animationSpeed * Time.deltaTime, 0);

            // If the scale of the text is = or greater than 'maxSize', change increaseSize to false
            if (text.localScale.x >= maxSize)
            {
                increaseSize = false;
            }
        } else
        {
            // Decrease the size of the text
            text.localScale -= new Vector3(1 * animationSpeed * Time.deltaTime, 1 * animationSpeed * Time.deltaTime, 0);

            // If the scale of the text is = or smaller than 'minSize', change the increaseSize to true
            if (text.localScale.x <= minSize)
            {
                increaseSize = true;
            }
        }
    }
}