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

Loading Gui Help ????

Asked by
TrollD3 105
9 years ago

I want to make a script that makes a txt button like grow in size (horizontally) and then stop at a specific spot. I also want it to say loading on it when the bar finished growing. I want it to load in this direction --------->... Can someone help me rewrite this? the size of the text box is {0, 0},{0, 110} (it is 0 because I want it to load. and it will grow once the script is right). The position is {0, 10},{0, 540}. script of what I have so far:

local h = script.Parent
local xSize = 1
local speed = 0.0025
while true do
    xSize = xSize - speed
    h.Size = UDim2.new(xSize, 0, 0, 0)
    if xSize < -0.1 then
        xSize = 1
    end
    wait()
while true do
function Load()
local h = script.Parent
wait (1)
h.Text = "Loading Map."
wait (.5)
h.Text = "Loading Map.."
wait (.5)
h.Text = "Loading Map..."
wait (1)
h.Text = "Loading Map."
wait (.5)
h.Text = "Loading Map.."
wait (.5)
h.Text = "Loading Map..."
wait (1)
h.Text = "Loading Map."
wait (.5)
h.Text = "Loading Map.."
wait (.5)
h.Text = "Loading Map..."
wait (1)
h.Text = "Loading Map."
wait (.5)
h.Text = "Loading Map.."
wait (.5)
h.Text = "Loading Map..."
end
Load()

0
Please stop re-posting the same Question over and over again just to get an Answer! Be patient! TheeDeathCaster 2368 — 9y

1 answer

Log in to vote
0
Answered by
Uroxus 350 Moderation Voter
9 years ago

First, you need to work on your efficiency, writing

h.Text = "Loading.."
wait(1)
h.Text = "Loading..."

is very boring to write and can also be done much easier by including this into a while loop, Like you've done, Just a bit more efficiently.

while true do wait()
local h = script.Parent
h.Text = "Loading map."
wait(1)
h.Text = "Loading map.."
wait(.5)
h.Text = "Loading map..."
end

Although I don't personally know how to do what you're asking, I have found a YouTube video which I have used in the past which does exactly what you're asking for. Take a look at it here :)

Ad

Answer this question