I am making a game called Crop Farm Tycoon and when you click the soil it gives you seeds. Now when you click the seed it is suppose to grow the crop. Please Note that this script works in studio mode, but not in Player Mode.
I have been reading articles saying that LocalPlayer does not always work in scripts. How do I fix this?
I use the script line,
game.Players.LocalPlayer
..but that only works in Studio Mode and when I test it in Player Mode it is like I never even done the script!
{ All I want to know is what to use instead of LocalPlayer to make this work work please give me a main thing that means localplayer, but isn't actually localplayer with an explanation please!}

3 comments
LocalPlayer NEVER works in normal scripts, not unless you pass it from a LocalScript using a RemoteEvent/Function. It works in Studio because the client/server relationship isn't the same as online.
what could I subsitute LocalPlayer with in a script?
You can put a LocalScript in StarterCharacterScripts and use Button1Down and mouse.Target. Send your player to a server script using a RemoteEvent and continue your code through this script. You should be implementing Filtering Enabled this way anyways.