The reason this doesn't work is that you're using StarterGui. The StarterGui object is meant to copy the contents of it to every player, changes cannot be made if you edit from StarterGui.
Look at this if you still don't understand.
"When you make a new Roblox game, this screen GUI space doesn’t exist — it’s your job to add it. The easiest way is to add it to the StarterGui service so that it gets copied to a player’s local game session when they join the game."
The code for those scripts shouldn't be referring to StarterGui. The best and easiest way to do this is just parent the local scripts into the required objects, one inside the close button, and the other inside the button that opens the shop. You should then use script.Parent instead of the objects inside StarterGui. I'll give you the new fixed script based on what you have.
Here's some expected hierarchy. Anything going forward is a child of that object.
And now here's the new scripts that should be fixed.
Close script:
script.Parent.MouseButton1Click:Connect(function ()
script.Parent.Parent.Visible = false
end)
Open script:
script.Parent.MouseButton1Click:Connect(function ()
script.Parent.Parent.ShopFrame.Visible = true
end)
If this helped you, remember to mark this answer as Solved.
(BTW if you think I'm spoon-feeding someone code, you're just wrong. I simply explained to the poster and gave him the new fixed script.)
EDIT: I just noticed someone already gave an answer, but I hope this helped too. (Probably not since you already accepted someone else but ok XD)