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()
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 :)