#why dont some functions exist in my module script? :(
1 messages · Page 1 of 1 (latest)
Idk try sending the code here not a pastebin
uhhh sure?
its not letting me, also why cant u just look at the pastebin?
the functions dont exist?
the scripts thinks they dont, even though i defined them
Since ur returning its a module script?
Thats not how modules work
And if its a server script local functions arent there
They are in client scripts
xD what
Also u cant return a function with a module
you can return anything with a module
and local function just means the function is local within the scope it has nothing to do with client-server
and the problem is that you're returning the init function which returns nothing?
you would want to return a table with the functions in it
ohhh
** You are now Level 5! **
kewl
okay it still doesnt work
try again
whatchu mean?
like test again or?
the output:
do u think im defining the functins wrong?
if u wanna define a function inside a module script to be used in other scripts you should follow either or of these
local module = {
x = function() end
}
return module
local module = {}
module.exampleFunction = function() end
return module
i dont want the functions to be used in other scripts, just this module script.
why create a module then
Look up module script in roblox forum
the two ability use functionss are just to be used in the modile script, the init function is for other scripts
modules wont return local functinos
you can if you want
function module.init([args])
no you can not?
yeah you can
local function a()
end
return a
you can basically do that
and the module would return a local function
💀
?