Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How to create Chalk Easer item! - A Tutorial for Baldi's Basics

Hello! I will show you how to create the chalk eraser item!

Editor stuff

So make a chalk little cloud thing animation and then make it a prefab. In the prefab, had a collider to it and make sure you scale it do it fits all of it. ALSO make sure isTrigger is on, this is important.

and thats all i guess, I GUESSSSS



Coding



1. Make the actual item: I have another tutorial for this so check that out, its actually accurate do yah.

2. In the PlayerScript make a boolean saying if your in the chalk cloud or not and in the "OnTriggerEnter" function put this code

if (other.transform.name == "ChalkCloud")

   boolean = true;
}
Now in the OnTriggerExit function put this
if (other.transform.name == "ChalkCloud")

   boolean = false;
}
Now in ALL character scripts find the raycast if statement and then simply add a "& !player.boolean to it.

And your done! SYCHE

3. In the prefab give it a script
And in the script make a float variable called cooldown and then tick it down in the update method and then say if the float variable is less than 0, destroy.

4. Now in the GameControllerScript make a reference to the cloudPrefab and then Instantiate it in the item code for the ChalkEraser. Then Bam your done for reals.