Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would you make the GUI get bigger by the seconds you enter?

S0 I am trying to make this XP bar have a full bar that grows with it. It is very confusing... Help?

while true do
	wait(0.01)
	script.Parent.Size = (0.1)
	wait(2)
	script.Parent.Text = (0.2)
	wait(5)
	script.Parent.Text = (0.3)
	wait(10)
	script.Parent.Text = (0.4)
	wait(15)
	script.Parent.Text = (0.5)
	wait(20)
	script.Parent.Text = (0.6)
	wait(25)
	script.Parent.Text = (0.7)
	wait(30)
	script.Parent.Text = (0.8)
	wait(35)
	script.Parent.Text = (0.9)
	wait(40)
	wait(0.1) script:Remove()
end

4 comments

0

There are a couple of things that are probably wrong here, what are you trying to accomplish?

0

I am trying to make the Full XP bar, that is at 0 fill in the empty XP bar. I want to make the X axis move more until it fills it.

0

Okay, when do you want it to change in size? After a particular amount of size, it automatically resizes? Once a certain event happens?

0

Basically I want it to change size when you collect an item.

1 answer

✓ Accepted answer

I would recommend using a simple for-do statement. You also changed Size to Text

Here is my improved script:

waitTime = 5

for i = 0, 1, .1 do
	script.Parent.Size = UDim2.new(i,0,1,0)
	wait(waitTime)
	waitTime = waitTime + 5 --Waits five more seconds each time the script loops around
end

This discussion is preserved as it was. New answers, comments, and votes are closed.