So I have a problem with my shop gui, which is that if you die in-game and respawn and try to open the shop, it doesn’t open. There are no errors in ze output, and this is the code, the explorer where the gui is located, and where the local script is for opening the shop.
Local Script for opening the Shop:
local textbutton = game.Workspace.faf.SurfaceGui.TextButton
local player = game.Players.LocalPlayer
local GUI = player.PlayerGui:WaitForChild("ToolShop")
textbutton.MouseButton1Click:Connect(function()
GUI.Frame.Visible = true
end)
Here is where the part with the surface gui which opens the shop is located (The Part Containing the gui which opens the shop is named faf):
https://ibb.co/3fjM1wB
Here is where the tool shop gui is (The Tool Shop is named ToolShop):
https://ibb.co/D5Lk2QK
The local script is located in starter player scripts.