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

What is wrong with this script? Its a loading script and i want it to slide up when it's loaded

Asked by 6 years ago
game.ReplicatedFirst:RemoveDefaultLoadingScreen()

script.Parent.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")

IntQSize = game.ContentProvider.RequestQueueSize
print(IntQSize)

while game.ContentProvider.RequestQueueSize >0 do
    wait(0.2)
    if 1-(game.ContentProvider.RequestQueueSize/IntQSize) > 0 then
        script.Parent.Frame.BarTop.Size = UDim2.new(0.78*(1-(game.ContentProvider.RequestQueueSize/IntQSize)),0,0.09,0)
    end
end

script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
script.Parent.Position = script.Parent.Position + UDim2.new(0,0,-0.1,0)
wait (0.01)
0
There is a more efficient way to do this, and really can reduce lag. Use a for loop. It might not answer your question but this is some inefficient coding xd Nep_Ryker 131 — 6y
0
Yeah i know but when i first used this script i wanted to see how far is good ANDREW50060 1 — 6y

Answer this question