Is this your entire module script? If so, you aren’t formatting it correctly. You need to literally return a value from the module itself, outside of a function.
Most often people format modules like:
local module = {}
function module.smile(coolstring)
return coolstring .. ' :)'
end
return module
then
local module = require(replicatedStorage.module)
print(module.smile('this is a text'))
However you can also just return a function like so:
local function smile(coolstring)
return coolstring .. ' :)'
end
return smile
then define smile as module
local smile = require(replicatedStorage.module)
print(smile('this is a text'))
It’s just whatever is the return result of the module’s source itself is what needs to be returned. Require doesn’t just dump the environment of the module script’s source into a table.