The question is rather long but I'll try to cut to the chase:
I've been experimenting with debounces and I'm interested in creating a script that affects a GUI so that the script only runs once while being touched and cannot run again until the player is detected to have stopped and started touching the BasePart again.
I'll attach my current script if it helps:
part = game.Workspace.ZONEMeridonWoodlands local debounce = false
part.Touched:connect(function(hit)
if not debounce then
debounce = true
print(hit.Name .. " was touched by the part!")
end end)
Currently this script works to only play the script once however it doesn't appear to play the script when the BasePart is touched a new time. The full original script is much longer but all that was removed was a sizeable midsection of making very small changes to the properties of the GUI.
Any advice is appreciated. I'll try to stay active so I can answer any questions.
