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

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.