Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Do I Make A Loading Screen With Tips? (Math.Random stuff)

Asked by 5 years ago

Alright So I want to make a loading screen(a fake one) to my game. Instead of saying Loading... it says tips. The tips are random. I made a couple ones, don't judge.


   while true do


   script.Parent.Text = Random(1,7)


i=1 script.Parent.Text="Follow Your Dreams- Abraham Lincoln"


i=2 script.Parent.Text="Timing Is Key"


i=3 script.Parent.Text="Dont Forget The Last Jump!"


i=4 script.Parent.Text="This Is A Fake Loading Screen"


    i=5 script.Parent.Text="Remember! Practice Makes Progress"


    i=6 script.Parent.Text="Sometimes Unlocking Buttons Unlocks Other Buttons"


i=7 script.Parent.Text="Look Around! Use Your Camera!"


end

__________________________________________________________________________Please fix this script, fellow Robloxians. Thank You In Advance

1 answer

Log in to vote
0
Answered by 5 years ago

i think you should use math.random() instead of just random(), also add a wait, because if u dont add a wait to your whlie loops, they get timeout, and lastly, make a variable for the number you get from the math.random() and assign each number a text, like i did in the following script:

while true do
wait(1)
local tip = math.random(1,7)

    if tip == 1 then
    script.Parent.Text="Follow Your Dreams- Abraham Lincoln"

    elseif tip == 2 then
    script.Parent.Text="Timing Is Key"

    elseif tip == 3 then
    script.Parent.Text="Dont Forget The Last Jump!"

    elseif tip == 4 then
    script.Parent.Text="This Is A Fake Loading Screen"

    elseif tip == 5 then
    script.Parent.Text="Remember! Practice Makes Progress"

    elseif tip == 6 then
    script.Parent.Text="Sometimes Unlocking Buttons Unlocks Other Buttons"

    elseif tip == 7 then
    script.Parent.Text="Look Around! Use Your Camera!"
    end

end

0
Thank You A lot! It worked but there was one mistake. The tips would change every second. I added a wait(5) after each tip to fix that. Thank You! TwinEmerald 2 — 5y
Ad

Answer this question