I don’t know why but I have a server script that locates the playergui and enables a gui to show but it doesn’t seem to work after once time of opening closing it.
This is the server script to open it :
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
local Gui = player:WaitForChild("PlayerGui").ShopGuis.GersonShop
Gui.Enabled = true
Gui.Frame.Shop.Text.Visible = true
Gui.Frame.Shop.Text2.Visible = true
Gui.Frame.Shop.Text3.Visible = false
Gui.Frame.Shop.Text.Text.Script.Disabled = false
Gui.Frame.Shop.Text2.Text.Script.Disabled = false
Gui.Frame.ShopItems.Visible = false
Gui.Frame.ShopItemsDisplay.Visible = false
Gui.Frame.Options.Visible = true
Gui.Frame.Shop.Visible = true
end)
This is the local script to close it :
local closebutton = script.Parent
local Gui = script.Parent.Parent.Parent.Parent
local Players = game:GetService("Players")
local client = Players.LocalPlayer
local char = client.Character or client.CharacterAdded:Wait()
local h = char:WaitForChild("Humanoid")
closebutton.MouseButton1Click:Connect(function()
Gui.Frame.Shop.Text.Text.Script.Disabled = true
Gui.Frame.Shop.Text.Text.Text = ""
Gui.Frame.Shop.Text.Visible = false
Gui.Frame.Shop.Text2.Text.Script.Disabled = true
Gui.Frame.Shop.Text2.Text.Text = ""
Gui.Frame.Shop.Text2.Visible = false
Gui.Frame.Shop.Text3.Text.Script.Disabled = true
Gui.Frame.Shop.Text3.Text.Text = ""
Gui.Frame.Shop.Text3.Visible = false
Gui.Frame.Options.Visible = false
Gui.Frame.Shop.Text4.Text.Text = ""
Gui.Frame.Shop.Text4.Visible = true
Gui.Frame.Shop.Text4.Text.Script.Disabled = false
task.wait(2)
Gui.Frame.Shop.Text4.Text.Script.Disabled = true
Gui.Frame.Shop.Text4.Text.Text = ""
Gui.Frame.Shop.Text4.Visible = false
Gui.Enabled = false
h.WalkSpeed = 40
h.JumpPower = 40
end)
Help would be appreciated thank you!