So I have a script with about 1000 lines but I want to get the player(localplayer) it wont work in a normal script and when I put it into a localscript the entire script wont work! Is there a way to fix this or to get the player another way.
game.Players.LocalPlayer.PlayerGui.Notify.Text.Visible = true
I don't have the whole script to look at, but I speculate that you put the LocalScript in the wrong place. LocalScripts can only work if they are in a player's Backpack, character model or PlayerGui.
This is actually a pretty simple fix. Just follow along with what I tell you, and it should work perfectly fine at the end.
• Ok so first, put a LocalScript with the same parent as the other script (Make sure the other one is a regular script)
• Next, create an ObjectValue with the same parent, and name it PlayerObject.
• Lastly, you need to put in your scripts. Put this into the LocalScript:
script.Parent.PlayerObject.Value=game.Players.LocalPlayer script:remove() --Optional Line
After you've done that, take out the part with the LocalPlayer on your other script, and set the Player to this:
repeat wait() until script.Parent.ObjectValue.Value Player=script.Parent.ObjectValue.Value
Now, if you've done everything correctly, I believe your script should work right.
Anyways, I hope I helped. If you have any further questions/problems, please leave a comment below, and I'll see what I can do :P