How to Create a Thread which prints a word ervery 3 seconds in lua?

I need help with creating a Thread which gives out a word every 3 Seconds. (“Hallo”)
And this should happen endless how to do this in lua?
Thanks for your time

CreateThread(function()
     while true do
          Wait(3000)
          print(“hallo”)
     end
end

Typed with my phone so indentation may be bad.

it doesent work in lua.exe?

Why are you referring to Lua as an executable file?

@wasabirobby’s code will work fine in Lua.

I figured they do not understand and need to do some more more homework.

  1. Install visual studio code (https://code.visualstudio.com/)
  2. Open your server files
  3. Put the code that @wasabirobby send in a resource
  4. Start script

thx
(:

it works i was brain afk