How to Make a Script in Minecraft (Mod Maker guide)
Learn how to create a custom Script in 9Minecraft Mod Maker right in your web browser. Design a visual flow of events and actions with a specific trigger for your Bedrock add-on.
Open 9Minecraft Mod Maker
Open your web browser and go to the 9Minecraft Mod Maker studio. Because it runs right in your browser, you do not need to download or install anything.
Create a new workspace or open an existing project. Make sure your workspace is set to Bedrock add-on 26.1, as this is the supported version for this element.
Add a New Script Element
Look for the green plus button in your workspace and click it to add a new mod element.
Find the Bedrock add-on group and select the Script element. Give your new Script a clear name so you can easily find it later.
Understand the Script Editor
The Script editor will now open on your screen. A Script is a graphically designed flow of events and actions with a specified trigger.
Instead of filling out traditional text fields, you will use this visual space to build how your add-on behaves.
Set Your Trigger
Every Script starts with a specified trigger. This tells the game when your script should begin running.
Choose the trigger that best matches the exact moment you want your custom event to happen in the game.
Design the Flow of Events and Actions
After setting the trigger, build your graphically designed flow of events and actions.
Connect your events and actions together in a sensible order so the game knows what to do step by step once the trigger is activated.
Save and Test Your Script
Once your visual flow of events and actions is complete, save your Script element.
Click the Build & run button in the studio to test your new Script and make sure the trigger and actions work the way you planned.
Export Your Bedrock Add-on
When you are happy with how your Script works during testing, use the export option in the studio.
This will package your Bedrock add-on 26.1 project so it is ready to be used and shared.
Tips
- Make sure your project workspace is set to Bedrock add-on 26.1 before looking for the Script element.
- Keep your first Script simple by starting with just one trigger and a single action to see how the graphical flow works.
- Always double-check that all your events and actions are properly connected to the specified trigger before clicking Build & run.
- Give each Script a descriptive name so you can easily remember what its trigger and actions do as your project grows.