Gui won't pop up another time when touched?

for some reason the gui won’t pop up after it is closed.

1st script (the main)

local debounce = false

game.Workspace.GUIPart.Touched:Connect(function(hit)
	if not debounce then
		debounce = true
		if game.Players:GetPlayerFromCharacter(hit.Parent) then
			game.ReplicatedStorage.ShowGUI:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
		end
		wait(2)
		debounce = false
	end
end)


-- second script (the basic when it gets opened)



game.ReplicatedStorage.ShowGUI.OnClientEvent:Connect(function()
		script.Parent.Visible = true

end)

--  and the close one -- 

local a = script.Parent.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
	a.Visible = false
end)



--[[

please help I don't know whats wrong.

]]

What’s the point of using an event? You can easily make the GUI visible by accessing the player’s PlayerGui

function openGui(hit)
    if hit.Parent:FindFirstChild('Humanoid') ~= nil then
        local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
        local PlayerGui = Player:WaitForChild('PlayerGui')
        PlayerGui.ScreenGui.Frame.Visible = true -- Your GUI
    end
end

workspace.GUIPart.Touched:Connect(openGui)