Player = game.Players.LocalPlayer.Character
while Player.Humanoid.Health > 0 do
These are the lines that are giving me trouble; they're from a larger script, but the rest isnt relevant. Studio has no errors with the lines of code, but Player says this attempt to index "Player" (a nil value) I have many more errors in my other localscripts that do not occur in Studio. Does anybody have the solution for this? Thank you.
Edit: Player, as in ROBLOX Player. Studio, as in ROBLOX Studio. Don't get it confused with the variable, which is named Player.

3 comments
That should fix it!
Thank You! But why does game.Players.LocalPlayer.Character work in Studio but not in Roblox Player? It's even referenced on the Wiki
You must wait first because it takes a secound to load the character, you are pretty much defining it before it loads