Module script somehow loads locally

Hello there! I started learing profile service and wrote this code:

local module = {}
local profiles ={}
local players = game.Players
local template = {
	EquippedDecoration={},
	UnlockedDecoration={},
	Coins=200
}
print('asdadf')
local profileService = require(game.ServerScriptService.ProfileService)
print(profileService)
local profileStore = profileService.GetProfileStore('PlayerData',template)
players.PlayerAdded:Connect(function(plr)
	local profile = profileStore:LoadProfileAsync('Player_'..plr.UserId)
	if profile then
		profile:Reconcile()
		if not plr:IsDescendantOf(players) then profile:Release() return end 
		profile:ListenToRelease(function()
			profiles[plr]=nil
			plr:Kick("DATA LOADED UNCORRECTLY SORRY REJOIN YEAH")
		end)
		profiles[plr]=profile
	else
		plr:Kick("DATA LOADED UNCORRECTLY SORRY REJOIN YEAH")
	end
	
end)
players.PlayerRemoving:Connect(function(plr)
	local profile = profiles[plr]
	if profile then
		profiles[plr]=nil
	end
end)
function module.GetProfile(plr)
	local profile =profiles[plr]
	if profile then
		return profile
	end
end
return module

And I get this result:
Screenshot_3
I searched for all local scripts and none of them requires this module script.

wait, are you requiring a module inside a module?

Yes. I think I understood an error. I just require a module inside a module which i require locally

1 Like

Wait, if I am getting this straight the problem is that you don’t want “asdadf” to print since you are not requiring the module on the client?

The problem is i dont want the module to be required from local script what I didn’t do at all. The answer I said is wrong btw because I required only 2 modules locally in which I didn’t require anything

Nvm, now I get it. I guess you were trying to require that module which was being required by another module and that made it error since you were requiring it locally and didn’t notice.

Well answer I said was true. I just didn’t find a script that was requiring module where I use save data module