The red hacked block.
The block as a Cat Block.

An undefined hat block is a block generated by an error. It can not be connected with any other block, and doesn't have any function.[1] Some Scratchers call it a Hat Block[2] but it is actually a combination of both a hat and Cap Block. It does not have an input. It is the only red block in Scratch 3.0. Unlike other blocks, it does not have an outline.[3] It cannot be commented on, and trying to comment on this block will cause the block to follow the mouse. Going to a different sprite while it's following the mouse will cause the block to disappear, and attempting to go back to the original sprite causes the block to become immobile. Going to the Costumes or Sound Tab and returning to the code will crash the project.[citation needed] This block cannot be found in the blocks palette, so it requires the below methods to make them.


Method 1

One of the only ways of generating this block is to edit the project JSON file.[4] The steps are as follows:

  1. Make a new project and drag a block.
  2. Save the project to your computer and rename the .sb3 to .zip.
  3. Open the .json file, locate the block, and rename it to something that doesn't exist.
  4. Change the file back into .sb3 and load it from your computer.
  5. The project should now have the block.

Method 2

This method is simple, just backpack a undefined hat block from other's projects.

Method 3

Trying to create a custom block with a name containing a control character, such as the backspace character or a NAK (Negative Acknowledge) character, also creates an undefined block.[5]

NAK can be copied from (works in most of the browsers): First, go to [[scratch:search/projects?q=%15]]. Then copy the invisible character from the search bar. Paste it onto a custom block (on an empty project) and the red hacked block will appear. However, putting it into an existing project will make it glitch, causing the whole project to disappear. Its code becomes hidden, but it works. Other control characters such as %14 (device control 4) also work, and creates the general red hat block.

The control characters' names can be found when highlighting it.

See Also


Cookies help us deliver our services. By using our services, you agree to our use of cookies.