Require Module Script

require(module)(“String”)
what would I put in the module script to automatically do something when it is required like that and how to get the string?

You can only require the Module Instance when calling require(), are you talking about receiving a string inside a function? You could just do something like this

--Random Script to call the function
local Module = require(game.ServerScriptService:WaitForChild("ModuleScript"))
local String = "Hello!"

wait(5)
Module.SayString(String)
--The Main ModuleScript
local Module = {}

function Module.SayString(String)
    print(String)
end

return Module

I want something to trigger within the module without having to do a function.

You can basically return almost anything inside a module including a string and Instance.

Heres 3 examples.

return 'This is my string.'
local module = require(path.to.module)
print(module) --> "This is my string."

local myNum = 5
return myNum
local number = require(path.to.module)
print(number) --> 5

print('Hello world! This is a test.')
return nil -- Just so we don't get an error.
require(path.to.module) --> Hello world! This is a test.

module

print('hello world') -- when it's required it will run

return -- return nothing because it is already called

Unfortunately that only works once because of cashing

Well then just do it.

--Script
require(Module Path)
-- Module
local module = {}

-- What the script will do without a function
print("Test")

return module