#The event code doesn't work PlayerEvents.chat
20 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Paste version of example.js from @autumn wing
I have changed everything to lower case, but still nothing happens
they are saying your condition is capitalized
even though the thing you are checking is being sent to lowercase
By the way, it doesn't work either
But you had Hi
What file are you putting this code in and in what folder?
It should be server scripts
hold on
PlayerEvents.chat(event => {
if (event.message.toLowerCase().includes('hi!')) {
event.getServer().scheduleInTicks(6, ctx => {
event.player.tell(Text.blue('Welcome!'))
})
}
})```
Everything works, thank you very much!