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

How can i remove the top bar in a loading screen?

Asked by 4 years ago

I'm working on a game and i made a loading screen for it , but while the loading screen is visibile the top bar isn't covered by the gui , how can i fix it?

Picture of what i mean : https://imgur.com/a/hwfcqOA

That's my code for the loading screen :

local screen = math.random(1,3)

if screen == 1 then print '1' 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)

end

if screen == 2 then print '2' script.Parent.Parent.Parent.Parent.Enabled = true wait(2)

script.Parent:TweenSize(UDim2.new(.1, 1, 1), "Out", "Linear", 3, true)
wait(1)
script.Parent:TweenSize(UDim2.new(.4, 1, 1), "Out", "Linear", 2, true)
wait(4)
script.Parent:TweenSize(UDim2.new(.7, 1, 1), "Out", "Linear", 3, true)
wait(1)
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)

end if screen == 3 then print '3' script.Parent.Parent.Parent.Parent.Enabled = true wait(2)

script.Parent:TweenSize(UDim2.new(.6, 1, 1), "Out", "Linear", 2, true)
wait(2)
script.Parent:TweenSize(UDim2.new(.8, 1, 1), "Out", "Linear", 3, 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)

end

script.Parent.Parent.Parent.Visible = false

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

The most simple way to do is is to make the screen gui bigger:

script.Parent.Size = Udim2.new(2,0,2,0)
0
where you should i add this line? Or with what line do i need to change it with? TheD4rkPow3r_WFE 13 — 4y
0
Just change it manually, no need to use script, or if u want you can add it to the first line of your script Nguyenlegiahung 1091 — 4y
0
i tried both ways but it still doesn't cover it TheD4rkPow3r_WFE 13 — 4y
0
what u mean ? Make sure the gui position is in the middle Nguyenlegiahung 1091 — 4y
0
Oh uh.. i just tested it and i can't seem to find a way to get it covered Nguyenlegiahung 1091 — 4y
Ad

Answer this question