The module script works locally

I want to use the module script to add currency to the player. I call the module script from a local script and add the currency, but why is it added locally?

Model script:

local module = {}
function module.Reward1(player)
	player.leaderstats.Tokens.Value+=100
end
return module

Local Script:

local module = require(game.ReplicatedStorage:WaitForChild("LevelsReward"))
module.Reward1()

Because your calling it from a localscript… Require and call it’s functions from a normal script instead.

3 Likes

It added locally because you’re using a local script. Use server script instead.