Trouble with frame not opening, though it says its visible

Hey, so I’ve been making a main menu and I’ve been trying to make it when you press a button it opens a frame, for some reason it works but when I try to make it visible it makes it visible, but not visually. When I tested it I’d go into the explorer and It’d say the frame was visible but it wasn’t visible, even though the ScreenGui was activated. Also, the button that you press is within a different ScreenGui and Frame than the other ScreenGui and Frame if that makes a difference, also no errors in the output as it seems. Localscript is also located where the button is, I know the button for sure works because I have other things inside of it as well, just not the frame opening. Any suggestions or fixes? Thanks.

-- Variables --
local playButton = script.Parent.PlayButton
local storeButton = script.Parent.StoreButton
local quitGameButton = script.Parent.QuitGameButton
local storeFrame = script.Parent.StoreFrame
local mainFrame = script.Parent
local textButton = script.Parent
local camera = game.Workspace.CurrentCamera 

-- Scripts --
playButton.MouseButton1Down:Connect(function()
	mainFrame.Visible = false
	game.StarterGui.OpenGui.ShopFrame.Visible = true
    workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end)

quitGameButton.MouseButton1Down:Connect(function()
	game.Players.LocalPlayer:Kick("You left")
end)

storeButton.MouseButton1Down:Connect(function()
	storeFrame.Visible = true
	local frame = storeFrame
	frame:TweenPosition(UDim2.new(0.255, 0,0.145, 0)
		
	)
end)
3 Likes

The reason why the frame is not visually visible is because you are manipulating the original copy in the Starter Gui, which you shouldn’t.

Instead you should change the frame in the Player Gui:
game.Players.LocalPlayer.PlayerGui.OpenGui.ShopFrame.Visible = true

See if that solves the issue.

7 Likes

Thank you, it works perfectly.

3 Likes