Hi!
I am currently working on migrating my current money system into an encapsulated system using a module script containing each of the functions I need. The code runs alright, however the issue comes when passing the parameters into the functions themselves.
I have drafted a simple script to test whether the system works. This is a server side script which is a child of the server script service, and runs the way I would like it to:
The issue comes here, when going into the function that had been called the Player parameter is nil. I know this because I added some print methods to check the names of the Player object in each function.
When adding the following print statements:
The result is this:
The error message seen above is caused by the script trying to access the UserId of an object which is of course not set to the instance of player.
Is there any way to ensure the player object is passed into the function?
Any help would be much appreciated,
Thanks, -ThomasMGardiner