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)
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!
Make sure the shop âScreen UIâ is enabled not disabled.
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