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

TweenSizeAndPosition does not work on SurfaceGuis?

Asked by
Nickoakz 231 Moderation Voter
9 years ago
while base.Disp.SurfaceGui.Frame.TextLabel.Text=="Open" do
    local tl=Instance.new("TextLabel",base.Disp.SurfaceGui.Frame)
    tl.Size=UDim2.new(0,math.random(5,25),0,math.random(5,25))
    tl.Position=UDim2.new(.5,-tl.Size.X.Offset/2,.5,-tl.Size.Y.Offset/2)
    tl.ZIndex=0
    tl.Text=""
    tl.BackgroundColor3=Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255)
    local randnum=math.random(15,75)/100
    tl:TweenSizeAndPosition(
        UDim2.new(0,0,0,0),
        UDim2.new(math.random(0,1000)/1000,0,math.random(0,1000)/1000,0),
        nil,
        nil,
        randnum
    )
    game.Debris:AddItem(tl,randnum+.6)
    wait(math.random(1,25)/100)
end

The gui just stays in the center, and does not shrink, but in Roblox Studio Play Solo, it works.

0
They now only work in local scripts. Shawnyg 4330 — 9y
0
Ok. I'll just make a script in PlayerGui to check the text and create a screen. Nickoakz 231 — 9y
0
That really blows though. I have to use TweenPosition on 30 voting booths, and set all to be local scripts? Really roblox? This was working a while ago. Nickoakz 231 — 9y
0
Oh thank god, it came back. Nickoakz 231 — 9y

Answer this question