generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Module: "Attempted to call require with invalid argument(s)"

Previous Thread :: Next Thread 
SEVENTLY is not online. SEVENTLY
Joined: 12 Mar 2016
Total Posts: 1516
23 Jun 2016 03:31 PM
I'm trying to get a module script to work, but all I get is this error in the output. Here's the entire module:

local module = {}
Tool = script.Parent

--Timer function
function module.timerStart()
local timer = Tool.TimerActive.Timer.Value
timer = 2
while timer ~= 0 and Tool.TimerActive.Value == true do
timer = timer - 1
wait(1)
print(timer)
end
end

return module

-------------------------------------------------------------------

I use this in the regular script to call the module:

local myModule = require(Tool:WaitForChild("TimerScript"))


Report Abuse
SEVENTLY is not online. SEVENTLY
Joined: 12 Mar 2016
Total Posts: 1516
23 Jun 2016 03:35 PM
bump


Report Abuse
SEVENTLY is not online. SEVENTLY
Joined: 12 Mar 2016
Total Posts: 1516
23 Jun 2016 03:38 PM
bump




Report Abuse
SEVENTLY is not online. SEVENTLY
Joined: 12 Mar 2016
Total Posts: 1516
23 Jun 2016 03:43 PM
Can anybody help?


Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
23 Jun 2016 03:45 PM
Are you certain that TimerScript is a ModuleScript?
Report Abuse
SEVENTLY is not online. SEVENTLY
Joined: 12 Mar 2016
Total Posts: 1516
23 Jun 2016 03:54 PM
I named the script above the module the timerScript...

Thank you!


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image