How load into game a module by ID

Hello!
I uploaded to roblox a module that I want to insert to game and use it,
But it do now work
Script:

local S = {}


function S:RankUser(UserId,RankId)
	local ACCESS_KEY = require(script.Loader)
	ACCESS_KEY = ACCESS_KEY.Activate()
	ACCESS_KEY:IsLicenseValid()
end

return S

Module that load in:

local s = {}
function s.Activate()
	local s = require(5704737342)
	print("s")
	return s
	
end
return s

Error:
Unable to find module for asset id 5704737342. Does the asset have a ModuleScript named ā€œMainModuleā€?
Stack Begin
Script ā€˜ServerScriptService.Modulariz: Ranking API.Loaderā€™, Line 3 - function Activate
Script ā€˜ServerScriptService.Modulariz: Ranking APIā€™, Line 6 - function RankUser
Script ā€˜local s =require(game.ServerScriptService[ā€œModulariz: Ranking APIā€]) s:RankUser(1,1)ā€™, Line 1
Stack End

Thanks for any help!

Try renaming the module that youā€™re trying to require to ā€œMainModuleā€.

3 Likes