I've scripted a moneyGiver, moneySpend, itemDropper and leaderboardSystem. . They all have their own custom functions as: moneyGiver(), moneySpend(), itemDropper() and leaderboardSystem().
Occasionally, for some reason the leaderboard can be found in the Player and sometimes it isn't found. When I test the game in a server, the moneyGiver works completely fine. So does the itemDropper, and so does the leaderboard. However, when I click the moneySpend pad, it is supposed to deduct cash. Yet, it doesn't and says that the leaderstats cannot be found inside the Player. I have no idea how I would be able to fix this.
The screenshot with the error and code can be found here: http://prntscr.com/jqz3hb
Thank you. :)
~Nixvoid

2 comments
leaderstats.Parent = game.Players.LocalPlayer
I don't even need to try that to know that it cannot be used. LocalPlayer cannot be used to find the player. It only works for the client, rather than the server since these are server side scripts.