Creating the script
In this step, we will write the script for the mute chat script.
Last updated
Was this helpful?
In this step, we will write the script for the mute chat script.
Last updated
Was this helpful?
First, we must write our script. For this script, we will use the "Player Chat Message" script.
Once we have the script, we will use the "Get Variable (String)" and "Compare String" elements to see if the mute-command has been used and the script is on.
We will not write a compare script for "off" because if it is off. This script will do nothing if the value is not "on."
We'll add the "If Else Statement" element after you've added the "Compare String" element.
When the mute-script is enabled, we will add the element "Block Vanilla Behaviour," which will prevent the message from being sent.
Once we've blocked the message, we'd like to notify the player that the chat has been locked. This is possible with the "Player Message" element.
When you've finished writing the script, it's time to put it to use.