Hello!
Thank you for the question :D The `"startHats": true` should be contained within the theme itself, as part of one of the block styles. Then you can use `setStyle` to associate the block with the given style.
```
const blockStyles = {
'hat_blocks': {
'colourPrimary': '#4C97FF',
'colourSecondary': '#4280D7',
'colourTertiary': '#3373CC',
'hat': 'cap',
},
};
var theme = Blockly.Theme.defineTheme('themeName', {
'blockStyles': blockStyles,
});
const workspace = Blockly.inject('blocklyDiv', {theme: theme});
// This code usually exists in another file.
Blockly.Blocks['startblock'] = {
init: function () {
this.setStyle('hat_blocks'); // Set the style to match the style *name*.
this.setNextStatement(true, null);\
}
};
```
I hope that helps! If you have any further questions please reply =)
--Beka