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

How do I make a GUI with an increasing size?

Asked by 8 years ago

For some reason this dosen't work, what is the problem?

local introSize1 = 0

    while introSize1 < 430 do

    introSize1 = introSize1 + 1
    game.StarterGui.Intro.frameOne.Size = UDim2.new(1, 0, 0, introSize1)



        wait(0.1)
    end

0
You are changing it in "StarterGui" Not their playergui TopDev 0 — 8y
0
What do you mean by that, can you give me an example? Hyperclux 65 — 8y
0
"game.StarterGui" is a GUI container that replicates the GUIs to the players. It has no visual effect upon each of the player once the GUIs in it are manipulated (unless if the player respawns). The PlayerGui's what you're looking for. It's the Player's own GUI container that you can manipulate in for this purpose. Redbullusa 1580 — 8y

2 answers

Log in to vote
0
Answered by
TopDev 0
8 years ago

Try this

local introSize1 = 0
game.Players.PlayerAdded:connect(function(p)
p.PlayerGui:WaitForChild("Intro") 
p.PlayerGui.Intro:WaitForChild("frameOne")

    while introSize1 < 430 do

    introSize1 = introSize1 + 1
    p.PlayerGui.Intro.frameOne.Size = UDim2.new(1, 0, 0, introSize1)



        wait(0.1)
    end


end)
Ad
Log in to vote
0
Answered by 8 years ago
local player = game.Players.LocalPlayer
repeat wait() until player.Character
local gui = player.PlayerGui

local introSize1 = 0
    while introSize1 < 430 do
    introSize1 = introSize1 + 1
    gui.Intro.frameOne.Size = UDim2.new(1, 0, 0, introSize1)
        wait(0.1)
    end


Answer this question