Function does not get arguments

I’m making a function and whenever I input arguments it returns back nil.

local bn = require(script.Parent.Task)

local module = {
	["Overwrite"] = {
		Damage = 10,
		Cooldown = 10,
		Stun = 2.5,
		CustomFunction = function(player)
			local c = player.Character
			if game:GetService("CollectionService"):HasTag(c, "Summoned") then
				local Sounds = {"BarrageHit", "MediumPunchHit"}
				bn.playClient("Sound", Sounds)
			end
		end
	}
}

return module

That’s my table and when I fire the function

st.Overwrite:CustomFunction(player)

The argument returns back nil (also sorry I’m not the best scripter haha.)

Instead of using a Colon, maybe try a dot?

st.Overwrite.CustomFunction(player)

Or perhaps

st["Overwrite"]["CustomFunction"](player)

I used a dot and it worked as intended, thank you!

1 Like

Anytime! If you have anymore issues don’t be afraid to make another post!