GUI doesn't re-appear

game.Players.PlayerAdded:Connect(function(plr) -- works
	plr.Chatted:Connect(function(msg) ---works 
		print("peep")-- works
		if msg == "handto" then --works
			print("hi")-- works
			if plr.PlayerGui.give.Enabled == false then
				plr.PlayerGui.give.Enabled = true
			else
				plr.PlayerGui.give.Enabled = true
			end
			print("success ") -- works
		end
	end)
end)

After saying handto, then closing it using the button on the GUI, and saying handto again, it doesn’t work. I have no errors.

the script to close the gui for whaatever reason
script.Parent.Cancel.MouseButton1Click:Connect(function()
	script.Parent.Parent.Enabled = false
end)

You are doing

.Enabled = true
else
.Enabled = true

The first one needs to be false
Also, in the gui you are closing it locally, so the server doesnt see it and doesnt know when its closed.

2 Likes