string STRING = "Test 1 Test 2 Test 3 Test 4 Test 5"; int webLines = STRING.Split(' ').Length; int lineNumber = UnityEngine.Random.Range(0, webLines - 1); string lineText = STRING.Split(' ').ElementAtOrDefault(lineNumber);