I want to know how to make a "while touched" script.
So when a player is touching a brick, it will execute a function, but I also want it were the function will always execute intill the player steps off the brick.
So I want a loop when you are touching and i want the loop to end when you stop touching
thank you for any type of help!

1 comment
Your 'on' variable suffices as a debounce, no need for the extra 3 second wait. What you've written would make it so that you can't leave the part until 3 seconds after touching it, which I would imagine to be inconvenient for players. +1 for the otherwise accurate answer