|
| 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
|
  |
| Joined: 13 Apr 2015 |
| Total Posts: 113 |
|
|
| 24 Aug 2017 08:22 AM |
i think you need to define "player"
|
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|