Send message to all online players

A big new update is now available, introducing biomes, caves and much more!
Latest hotfix: (2024-02-21)
  • Hey,
    i am new in Lua scripting and trying to figure out how to send a message to all online players but it doesn't work :/
    list = getServer:getPlayers();

    for index, player in pairs(list) do
    player:sendTextMessage(event.player:getPlayerName() + " died.");

  • What messages/errors do you get? What happens if you run this code?

    Just 'it doesn't work' is really not lot of information

    Lua doesn't support + by attaching strings together as far as i know. Try .. instead

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!