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

Guis invisible when tweened?

Asked by 5 years ago
Edited 5 years ago

When i try to tween my frame it is invisible when i test it. The frame is visible when i see it not testing in the studio but when i test it is invisible. Here is the code in a localscript(it prints 'hi'). local screengui = game.StarterGui.start

local frame = screengui.Frame

local plr = game.Players.LocalPlayer

local file = game:GetService('ReplicatedStorage').StarFile

wait()

if file[plr.Name].playedBefore.Value == false then

print('hi')

frame:TweenPosition(UDim2.new(0.265, 0,0.09, 0), 'In', 'Linear', 1, false)

end

heres a photo showing that it tweened

[EDIT] So I figured out that when it tweens it doesn't move the gui contents it just changes its size. !blue thing is gui

0
Make the frame visible Loominatrx 0 — 5y
0
frame.Visible = true AnonymousDeveloper13 22 — 5y
0
Ok i will try this when i get home. The reason why i didnt do this in the first place was because it showed that the visible property was checked. XxHyperglassxX 4 — 5y
0
Tweening has no effect on visibility unless you put it outside the screen gullet 471 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

Make the frame visible or,

frame.Visible = true
Ad
Log in to vote
0
Answered by 5 years ago

here it will be more simple for u if u dont know where to put in the frame.Visible its all ur script but one tiny change, u can copy paste it

local frame = screengui.Frame

local plr = game.Players.LocalPlayer

local file = game:GetService('ReplicatedStorage').StarFile

wait()

if file[plr.Name].playedBefore.Value == false then

print('hi')

frame.Visible = true

end

Answer this question