Help with opening a GUI

I am trying to make a button to tween in a shop GUI.

It does not tween in. I think it might be an issue with the button itself, as when I replaced the tween with a print statement, nothing printed.

It is currently in a localscript.
3146bc93245a66999037710635ffb532
All of that is under a screengui in starterGUI.

This is the code I have in the localscript:

local passgui = script.Parent.Parent.Parent.GamepassesFrame
 script.Parent.MouseButton1Click:Connect(function()
	passgui.Frame:TweenPosition(UDim2.new(0.273, 0,0.255, 0), "InOut", "Sine", 0.5)
end)
1 Like

My only guess is that this isn’t located in the StarterGUI. I’m guessing it’s in the workspace, correct? If so, local scripts don’t run there. Consider putting the script in the StarterGUI.

You should maybe tween the passgui instead of the frame

No it’s in StarterGUI
(30 chars)

What do you mean by that?
This is under one screenGUI.

Tween “GamepassesFrame” instead of “GamepassesFrame.Frame”

No, ImageLabels can’t be clicked, Line 3 is fine

Works now. Thanks!
(30 charssssss)

1 Like