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
 

ModuleScript is not a valid member of _

Previous Thread :: Next Thread 
FarmerInMalaysia is not online. FarmerInMalaysia
Joined: 02 Jan 2015
Total Posts: 217
24 Aug 2017 06:02 AM
ok. i'm trying to use loadcharacter in a localscript by making a modulescript with that function. so, this is my module script:
function LoadChar(player)
player:LoadCharacter()
end
return LoadChar

its alright, it will work.

then in my local script, i do this:
local LoadChar = require(path)

and all i get is an error stating that "LoadCharacter is not a valid member of *insert parent here*" no matter where I put it. does anyone have any ideas as to why this is happening?
Report Abuse
ahmed2772 is not online. ahmed2772
Joined: 13 Apr 2015
Total Posts: 113
24 Aug 2017 08:22 AM
i think you need to define "player"


Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
24 Aug 2017 08:23 AM
require(path)(player)


Sometimes, it's the people no one imagines anything of, who do the things that no one can imagine.
Report Abuse
ahmed2772 is not online. ahmed2772
Joined: 13 Apr 2015
Total Posts: 113
24 Aug 2017 08:26 AM
can you tell me how will the script find the player if you didnt give information of what a player is


Report Abuse
FarmerInMalaysia is not online. FarmerInMalaysia
Joined: 02 Jan 2015
Total Posts: 217
24 Aug 2017 01:25 PM
because it's a function? player is just one of its args, i obviously have a predefined player in my script. why else would i need LoadChar? do you think i do "Please find the player I need":LoadCharacter()
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