so basically , i just started scripting for roblox , i am new , but everytime i get this error , i am trying to make a multi-tab shop and a crate opening system , but i am getting this : "openButton is not a valid member of TextButton "Players.Ciuflex2.PlayerGui.GunShop.Shop.openButton"

and here is the script :

local frame = script.Parent
local openButton = frame.openButton

frame.Visible = false

local function openMenu(openCrate)
	local player = game.Players.LocalPlayer
	player.PlayerGui.GunShop.Shop.Visible = false
end

script.Parent.MouseButton1Down:connect(function()
	script.Parent.Parent.openButton.CrateReview = true
	script.Parent.Parent.Parent.Shop.Visible = false	
end)

openButton.MouseButton1Click:Connect(openMenu)

2 comments

0

try using a wait for child on the gunshop

0

nothing works , i even tried a simplified script for that , just to make the both frames visible and invisible but nothing , same error everytime