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

Another problem with my loading intro gui?

Now, when it reaches the size (1, 0, 0, 100), it does nothing. I checked if it does reach that size, but that may be the problem. Any help?

wait(1)
script.Parent.Loading.Text = "Loading"
script.Parent.Loading:TweenSize(UDim2.new(1,0,0,100), "Out","Back", 10)
wait(10)
if script.Parent.Loading.Size == UDim2.new(1, 0, 0, 100) then
    script.Parent.Loading.Transparency = 1
    wait(0.1)
    for i = 0,1,.05 do
        script.Parent.BackgroundTransparency = i
        wait()
    end
end

1 answer

✓ Accepted answer

Let's start with the root of the problem. First off, after tweening you use wait(1). The only issue there, is that, like I said before, Tween does not yield. This means that you need to match it with the time it takes to tween.

The arguments of TweenSize are as follows:

UDim2 endSize, EasingDirection easingDirection = Out, EasingStyle easingStyle = Quad, float time = 1, bool override = false, Function callback = nil As you can see by this code, 10 is the time.

script.Parent.Loading:TweenSize(UDim2.new(1,0,0,100), "Out","Back", 10);

This means the wait(1) should be wait(10).

Hope this helped, ask me if you have any further issues or post on scripting helpers.

3 comments

1

Still does the same thing. Do you mean the wait before it checks if it has reached (1, 0, 0, 100)?

1

Mhm.

1

Well, it still does the same thing.

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