Player says it's nil, Studio says it exists?
Asked by
8 years ago Edited 8 years ago
1 | Player = game.Players.LocalPlayer.Character |
2 | 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
.