I wanted to make a game with tons of endings, it was fine until I tried to find how to make random texts like TIPS in the Loading Screen like “Get a Snack at 4AM”, but I don’t know how to do it. I searched.
I’ve been looking for over 5 months and still can’t find it.
local tips = {
"tip 1",
"tip 2",
"tip 3",
};
local function getRandomTip()
return tips[math.random(#tips)];
end
while true do
print(getRandomTip());
task.wait(5)
end
Here’s a quick example on how to pick a random string from an array of strings, in your case, tips.
3 Likes
Is this same as in “Get a snack at 4AM” Loading screen?
Ok, I see now. But again, thank you!