#why dont some functions exist in my module script? :(

1 messages · Page 1 of 1 (latest)

latent geyser
worldly cave
#

Idk try sending the code here not a pastebin

latent geyser
#

its not letting me, also why cant u just look at the pastebin?

worldly cave
#

the functions dont exist?

latent geyser
#

the scripts thinks they dont, even though i defined them

worldly cave
#

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

pale marsh
#

xD what

worldly cave
#

Also u cant return a function with a module

pale marsh
#

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

latent geyser
#

ohhh

runic gyroBOT
#

studio** You are now Level 5! **studio

latent geyser
#

kewl

latent geyser
pale marsh
#

try again

latent geyser
#

whatchu mean?

#

like test again or?

#

the output:

#

do u think im defining the functins wrong?

torpid creek
# latent geyser 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
latent geyser
wicked mantle
#

Look up module script in roblox forum

latent geyser
royal ridge
#

modules wont return local functinos

pale marsh
torpid creek
pale marsh
#

local function a()
end

return a

#

you can basically do that

#

and the module would return a local function

torpid creek
#

💀

pale marsh
#

?