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

How do i fix the error of "openButton is not a valid member of TextButton"?

Asked by 3 years ago
Edited 3 years ago

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)

````

0
try using a wait for child on the gunshop cjkizzy286 40 — 3y
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 Ciuflex2 0 — 3y

Answer this question