Shop GUI Not Showing

Already did that, it is set to 0

If its set to 0 then usually what i do is completely redo the frame over. This can also be a simple scale bug if your using the auto scale plugin

have you tried a print in that function and or in the if statements?

I made this in another place and saved it as a .rbxm then imported it to the current. It worked fine in the place I made it in, but now doesn’t work in the new place.

local ShopUI = script.Parent.Parent.Parent.Parent:WaitForChild("ShopUI")
local open = false

script.Parent.MouseButton1Click:Connect(function()
    if open then
        ShopUI.Enabled = false
        script.Parent.Text = "Open Shop"
    else
        ShopUI.Enabled = true
        script.Parent.Text = "Close"
    end
    open = not open
end)
2 Likes

it maybe you need to wait for child on the ui

local Player = game.Players.LocalPlayer
local ShopUI = Player.PlayerGui:WaitForChild('ShopUI')

Hey that fixed it! Idk how but it did lol, tyvm, much appreciated!

1 Like

Make sure the shop “Screen UI” is enabled not disabled.

https://i.gyazo.com/febdd48c39fa73a51c0ef5b30f50a668.gif

2 Likes

My bad I didn’t see you were testing while in game. Try to find if you accidently set the variable wrong ex. you may of did: script.parent.parent so on make sure you get the right object your wanting to hold in the correct var .
Try this code:

local open = false

if open == false then
ShopUI.(shopframehere).Visible = true
script.Parent.Text = “open shop”
open = true
else
open = false
ShopUI.(shopframehere).Visible = false
script.Parent.Text = “close”

end

1 Like