How to make Touch event active just 1 time until I leave the part and re-touch it

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to Open Gui just 1 time while I am on the part (I don’t want to re-open the Gui while walking on the part)
  2. What is the issue? Include screenshots / videos if possible!
    The Gui opens again after I Try to leave part
    Well I know this is what supposed to happen with that code but Idk how to make it the way I want
ScriptableFolder.MagazaAcar.Touched:Connect(function(hit)
	
	local player = players:GetPlayerFromCharacter(hit.Parent)
	if player then	
		remotes.ShopOpen:FireClient(player)
		print("We got the Data Bro Relax")
	end
end)

Check if the GUI is opened already on the client side if it is then don’t open it. Or if you mean that you want the player to close the GUI and still be able to walk on the part, I would suggest adding the player to a table and then checking whether the play is in the table or not when you trigger the remote event. Obviously use some kind of method to remove the player from the table after like 20 seconds of not touching it.

yeah That is what I am asking but I am sure there must be a way to do it without adding tables or 20 second cooldown because what happens if player accidently closes gui and wants to re-open it? that is really a bad way to do it

Yeah still open for ideas >30ChartThing<