How can I fix this Area GUI Problem

Hello! I am trying to having an issue with a GUI Area thing where whenever I jump it resets the GUI, here is a video on what I mean > 2021-10-11 22-41-44

Here is the script

	if game.Players:GetPlayerFromCharacter(hit.Parent) then
		if a == false then
			a = true
			local FolderExist = false
			for i, v in pairs(script.Parent["UI's"]:GetChildren()) do	
				if FolderExist == false then
					FolderExist = true
					local NewFolder ="Folder")
					NewFolder.Parent = game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui
					NewFolder.Name = "Area ".. script.Parent["Area ID"].Value
				v:Clone().Parent = game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui:FindFirstChild(tostring("Area ".. script.Parent["Area ID"].Value))
	if game.Players:GetPlayerFromCharacter(hit.Parent) then
		if a == true then
			a = false
			for i, v in pairs(game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui:GetChildren()) do
				if v.Name == tostring("Area ".. script.Parent["Area ID"].Value) then

If you need any more things just ask me! If you know how I can fix this, it’ll be appreciated :slightly_smiling_face:

What are you trying to achieve? Are you trying to make the cash says 0 constantly or make the cash says loading constantly?

So it says 0 Constantly, well how many stats you of it, instead of it resetting when you jump

So do you want it to just say 0?

I guess? You see how the Money GUI is out of it, and it’ll keep showing that, I need it to keep showing up when you jump aswell, but when you leave the area it changes back.

You could make an array containing of whoever touched the region, add them into the array and whoever is in the array give the the GUI, if the part detected them touching the region again, check if they are in the array. If they are, don’t do anything as you already showed them the Cash value, otherwise do your logic.

can you insert a print and see if it re runs the script everytime you jump?

where do I put it inside the script?

maybe here?

This text will be hidden