Loading screen not working properly

Hi, I’m doing an intro for my game but it doesn’t work, I need someone with knowledge or knowledge to help me.
I show you the exscript and a screenshot


script.Parent.Parent.Parent.Parent.Enabled = true
wait(2)
script.Parent:TweenSize(UDim2.new(.3,1,1), “Out”, “Linear”, 2 true)
wait(2)
script.Parent:TweenSize(UDim2.new(.5,1,1), “Out”, “Linear”, 1 true)
wait(3)
script.Parent:TweenSize(UDim2.new(1,1,1), “Out”, “Linear”, 1 true)
wait(1)

script.Parent.Parent.Parent.Parent.Enabled = false
wait(1)
script.Parent:TweenSize(UDim2.new(0,0,0), “Out”, “Linear”, 1 true)


screenshot

Thank you for reading
[I NEED EXTREME HELP]

1 Like

There are several things missing from this script which are required.

  1. Udim2 takes 4 Parameters, but right now you’re providing them with 3.
  2. There is no comma after the time number.
  3. You’ve included comma’s in the UDim2 after the 3rd number, despite there being no 4th number.

The script should look like so.

wait(2)
script.Parent:TweenSize(UDim2.new(.3,1,1,1), “Out”, “Linear”, 2, true)
wait(2)
script.Parent:TweenSize(UDim2.new(.5,1,1,1), “Out”, “Linear”, 1, true)
wait(3)
script.Parent:TweenSize(UDim2.new(1,1,1,1), “Out”, “Linear”, 1, true)
wait(1)

script.Parent.Parent.Parent.Parent.Enabled = false
wait(1)
script.Parent:TweenSize(UDim2.new(0,0,0), “Out”, “Linear”, 1, true)
3 Likes

the problem is that it doesn’t work for me

is that telling you the truth is that I am new

I will try to put it as you say

The 4th parameter for Udim2 on line 13 is also missing. So on line 13 it would be:

script.Parent:TweenSize(UDim2.new(0,0,0,0), “Out”, “Linear”, 1, true)

1 Like

it still doesn’t work for me
“Go to script error”

have you tried applying the fixed code that @Benified4Life sent you? Sizes for GUI objects contain 4 values, 2 for each coordinate (Y and X) which are offset and scale. You only have 3 values in your UDim2 lines. If you add on a 4th value, your script should work

I’ll try
moment…


look what’s happening right now

wait(2)
script.Parent:TweenSize(UDim2.new(.3,1,1,1), “Out”, “Linear”, 2, true)
wait(2)
script.Parent:TweenSize(UDim2.new(.5,1,1,1), “Out”, “Linear”, 1, true)
wait(3)
script.Parent:TweenSize(UDim2.new(1,1,1,1), “Out”, “Linear”, 1, true)
wait(1)

script.Parent.Parent.Parent.Parent.Enabled = false
wait(1)
script.Parent:TweenSize(UDim2.new(0,0,0,0), “Out”, “Linear”, 1, true)

Do this see if it works

hm. it appears that the position for your frames don’t match up with the rest of your GUI.

is charging, but they realize that they are going to both sides

I just put that and now ???

What is the anchor point of the loading bar?

I am not an expert of the Gui and scripts

just go to the properties of your loading bar, and tell us what the AnchorPoint is

this is what appears to me

oh i see your issue. Your bar is trying to go left, you should be making it go right

1 Like