Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Attempted to call require with invalid argument(s). ? "Solved"

EDIT2:I solved this on the chat!

EDIT:The error is in the title.

I am trying to get a module but it keeps giving me this error any help?

local S = require(self.Settings) --how I require it (self is the model where it is included in)

this is the module script below (the script is named Settings)

local settings = {
	shootDelay = 0.12;
	bulletStartSpeed = 10;
	bulletMaintainSpeed = 40;
	bulletInaccuracy = 16;
	bulletDamage = 7;
	reducedWalkSpeed = 2;
	reducedSprintSpeed = 4
}

return settings

So would anyone know what I am doing wrong? I am new to modules lol.

Thanks, :D ~KIheros

1 comment

0

Its up to you, but feel free to share your answer with other in case they come across a similar issue! Post an answer of course.

1 answer

I'm not 100%, but I'm pretty sure it's supposed to be named module, where 'settings' is, in Script 2.

1 comment

0

Nah, you can name it whatever you wish.

This discussion is preserved as it was. New answers, comments, and votes are closed.