Tutorial:The Vanishing Part

In this tutorial, we are going to make a that vanishes when touched and reappears shortly. We start by creating a part, and inserting a into it. Your hierarchy should look like this.

Open the script, and clear all the code. The first thing we want to do is define variables. The only variable we will need for this script is a variable called 'debounce'. This tutorial will explain what this variable is for. Next, we will hook up the Touched event.

Now we will check for a humanoid and check for the denounce.

Next, we need to set up a loop which will make the part vanish after a second.

The last step is to make it reappear. We will put a delay of 5 seconds until it reappears. Skip this step if you don't want your part to come back.