I am trying to experiment with ModuleScript's, I'm trying to make it print the name of every-thing in TestFolder but so far I am having problem's with this script. Can anyone tell me what I am doing wrong?
Server Script code:
script.Parent.MouseButton1Click:connect(function()
local module = game.ReplicatedStorage.Modules.TestingModule
module:GetChildren()
end)
ModuleScript code:
local module = {}
function module:GetChildren()
for i,v in pairs(game.ReplicatedStorage.TestFolder:GetChildren()) do
print(v.Name)
end
end
return module
Output:
GetChildren is not a valid member of ModuleScript

1 comment
Thanks.