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
.
wait() player = game.Players.LocalPlayer character = workspace:FindFirstChild(player.Name) while character.Humanoid.Health > 0 do