Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does my Gui script work with "Run" but not with "Play"?

I finally managed to make the script work, but for some reason it won't work in "Play", I've tried with the PlayerAdded function, but it dosen't work either way.

Here is the script I used, which managed to work. (In "Run")

sizeIntroP1 = 0

	while ( sizeIntroP1 < 300 ) do
		
		game.StarterGui.intro.introP1.Size = UDim2.new(1, 0, 0, sizeIntroP1)
		
		sizeIntroP1 = sizeIntroP1 + 1
		wait(0.01)
end

1 answer

✓ Accepted answer

UPDATED

p = game.Players.LocalPlayer
sizeIntroP1 = 0
p:WaitForChild("PlayerGui")
p.PlayerGui:WaitForChild("intro")
p.PlayerGui.intro:WaitForChild("introP1")

    while ( sizeIntroP1 < 300 ) do

        p.PlayerGui.intro.introP1.Size = UDim2.new(1, 0, 0, sizeIntroP1)

        sizeIntroP1 = sizeIntroP1 + 1
        wait(0.01)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.