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

Tweening? LOAD GUI

Asked by 9 years ago

I want to make a loading gui I done the tweening it doesn't seem to work :l heres the code

gui = game.StarterGui.ScreenGui.load

for i = 0, 100 do
    gui.Size = UDim2.new(0,i,0,0)
    wait()
end

WHATS WRONG??

2 answers

Log in to vote
0
Answered by
DataStore 530 Moderation Voter
9 years ago

You're changing the GUI which is in the StarterGui service. The problem with this is the fact that any changes to the GUIs in this service aren't propagated to players until they respawn, which is when this service's children are cloned to the player's PlayerGui - There is no link between the two past this point.

In order for your script to work, you'll need to edit the GUI which is located in the player's PlayerGui. If the script is in the GUI, you can quite simply parent up.

It should be noted that an easier way to tween a GUI, in terms of size or position, is by use of TweenPosition, TweenSize or TweenPositionAndSize methods of GUI objects. You can find information on all of these on the ROBLOX Wiki.

0
I figured it out DiamondCookie2 0 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

The size was starting from no value for it was technically invisible so I fixed it to the original current size then tweened it.

Answer this question