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.
]]