Can someone tell me if this would work in a ModuleScript, and if not what am I doing wrong with it that won't allow it to work in a ModuleScript?
local players = game:GetService("Players")
local module = {}
function module:Test()
for _,v in pairs(players:GetPlayers()) do
print(v.Name)
end
end
return module

1 comment
Thanks.