๐Ÿ“œ [Script] Tap / Touch Change Text Script - Random *Important

Options

Script:- Change Text on Tap Random

Ready to use Script

// Change Text Objects on Tap Script Random
// @input Component.Text mytext

// Add More Text Line by Line
var arr = [
"โ€œI Love Lens Studio 1.โ€",
"โ€œI Love Lens Studio 2.โ€",
"โ€œI Love Lens Studio 3.โ€"
"โ€œI Love Lens Studio 4.โ€"
"โ€œI Love Lens Studio 5.โ€"
"โ€œI Love Lens Studio 6.โ€"
"โ€œI Love Lens Studio 7.โ€"
"โ€œI Love Lens Studio 8.โ€"
"โ€œI Love Lens Studio 9.โ€"
"โ€œI Love Lens Studio 10.โ€"
];
//var randomNumber = Math.floor(Math.random() * 10) + 1;
var randomNumber = arr[Math.floor(Math.random() * arr.length)];
var anyvalue = randomNumber;
script.mytext.text = anyvalue;

Steps to use:-

  • Create Scene Object
  • Add Script Component
  • Create Script In Resource Panel & Rename it as TouchTextScript
  • Add TouchTextScript to Scene Object Script
  • Add Your Own Text
  • Copy Paste this Script & Save

Use:-

  • Change Multiple Text in Single Text objects on Touch.
  • Change Multiple text on Touch as Random.
  • No Need to Create Multiple text Objects / Screen Text Objects.