Needing help with shop gui

So I’m trying to make it so when you touch thus part it will make a frame visible, I made it so it gets yourself inside of players and then your playergui etc… and it works but when you click the close button (which works the same way) it wont become visible again, I tried using game.StarterGui and so on but then it didnt open at all so yeah if anyone knows what to do help would be much appreciated and I hope everyone has a great day!

1 Like

Changing anything in StarterGui will only affect new GUI that’s created.

What does your code look like? I’m assuming you just aren’t adding a check or resetting a check you currently have.

1 Like

This is my script right now: (sorry for late response)

script.Parent.Touched:Connect(function(hit)
local human = hit.Parent:FindFirstChild(“Humanoid”)
print(“I’ve been touched by a human D:”)
if human then
local plr = game.Players:FindFirstChild(human.Parent.Name)
if plr then
local plrgui = plr.PlayerGui
plrgui.ShopGui.ShopFrame.Visible = true
end
end
end)

1 Like

Does the close button just set the ShopFrame visible to false?

1 Like

I mean, its the easiest way. And its not like it doesnt work.

1 Like

That’s what they should be doing. I’m just checking that they aren’t Destroying it or something instead.

1 Like

Yea but i dont think any programmer would mess that up.

1 Like

You would be surprised. I’ve seen some things on the forums. haha

1 Like

The close works the same way just sets visible to false in the same way

Nvm I found out how to make it work but thanks for everyones help!