[40]plr = game.Players:GetPlayerFromCharacter(chr) [41]local hum = vCharacter:findFirstChild("Humanoid") [42]if hit.Parent.Name ~= "Soldier" and hit.Parent.Name ~= ("Guest") and hit.Parent.Name ~= ("") and hit.Parent.Name ~= "Emperor" and hit.Parent.Name ~= "Governor" and hit.Parent.Name ~= "Door" and hit.Parent.Name ~= "Door1" and plr.TeamColor ~= BrickColor.new("Bright blue") and humanoid~=nil and humanoid ~= hum and hum ~= nil then
Output: 13:26:03.117 - Players.Player.Backpack.NATMSword.SwordScript:42: attempt to index global 'plr' (a nil value) 13:26:03.118 - Stack Begin 13:26:03.118 - Script 'Players.Player.Backpack.NATMSword.SwordScript', Line 42 13:26:03.119 - Stack End
In the script it clearly has the value "plr" in the script. For some reason the engine isn't able to find the value? I took a piece of code from this giant sword script.
Your problem: the chr value is not a character of the player, or the chr value is nil meaning it is empty or the character no longer exists.