I used a local script here is the code:
local open = game.Workspace.openPart local close = game.Workspace.closePart local frame = script.Parent local closeButton = frame.closeButton
frame.Visible = false
local function shopMenu(otherPart) local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player then
player.PlayerGui.Shop_GUI.Shop.Visible = true
player.Character.Humanoid.WalkSpeed = 0
end
end
local function closeMenu() local player = game.Players.LocalPlayer player.PlayerGui.Shop_GUI.Shop.Visible = false player.Character.HumanoidRootPart.CFrame = CFrame.new(close.Position.X,close.Position.Y + 3,close.Position.Z) player.Character.Humanoid.WalkSpeed = 16 end
open.Touched:Connect(shopMenu) closeButton.MouseButton1Click:Connect(closeMenu)
btw where it says "screengui not a valid member of player gui" is in output

1 comment
there is a blue line under function and hit and its not working because of that