Textbutton inside frame

This script is supposed to make a frame visible, although it does I can’t see it.

local MasterUI = game.StarterGui.MasterUI
local MainFrame = script.Parent.Parent
local BadgesFrame = MasterUI.BadgesFrame
local TB = script.Parent
local Badge1 = BadgesFrame.Badge1
local Desc = BadgesFrame.Description

TB.MouseButton1Click:Connect(function()
	BadgesFrame.Visible = true
	print("Clicked")
end)
end)

The button to open the frame is inside another frame, I’m not sure if that has something to do with it

Script to open main frame

local MainFrame = script.Parent.MainFrame
local UIS = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local ogPosition = MainFrame.Position

UIS.InputBegan:Connect(function(input, event)
	if event then
		return
	elseif
		input.KeyCode == Enum.KeyCode.E then
		print("E was pressed")
		MainFrame.Position = UDim2.new(-1, 0,0.341, 0)
		MainFrame.Visible = not MainFrame.Visible
		MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
		MainFrame.Position = UDim2.new(0.1, 0, 0.5, 0)
		MainFrame:TweenPosition(UDim2.new(0.5, 0, 0.5, 0))
		MainFrame:TweenPosition(UDim2.new(0, 400, 0, 100), Enum.EasingDirection.In, Enum.EasingStyle.Elastic)
		wait(1)
	end
end)

image

I also get no errors

That’s weird, there’s only 1 end) in studio

A interface descendants visibility follows its parent.

So if the parent of BadgesFrame is not visible, then the BadgesFrame frame won’t be visible as well.

BadgesFrame doesn’t have a parent with a visibility option, its parented to a screengui.

is the screenGui enabled or is the badgesFrame set off screen?

You need to index it through the player’s PlayerGui (so player:WaitForChild(‘PlayerGui’).MasterUI)