of     1   

Pletonal
#182510517Wednesday, January 27, 2016 7:16 PM GMT

This keeps coming up in my output as if it were a nil value but the scripts works but it bugs me how the output says it's a nil value. if game.Players:FindFirstChild(hit.Parent.Name).TeamColor==BrickColor.new("Navy blue") then It's in a normal script because it's in a brick and it detects when it is touched.
KnowingComputer
#182510822Wednesday, January 27, 2016 7:23 PM GMT

Google what Nil means.
Pletonal
#182510901Wednesday, January 27, 2016 7:25 PM GMT

But if a player is nil why would the script work at the end?
Pletonal
#182510946Wednesday, January 27, 2016 7:26 PM GMT

Because if the player was nil then there is actually nothing since nil is not existent...
KnowingComputer
#182510948Wednesday, January 27, 2016 7:26 PM GMT

full script and output.
Pletonal
#182512060Wednesday, January 27, 2016 7:49 PM GMT

function OnTouched(hit) if game.Players:FindFirstChild(hit.Parent.Name).TeamColor==BrickColor.new("Navy blue") then else hit.Parent.Torso.Anchored=true hit.Parent.Head.Anchored=true hit.Parent["Left Leg"].Anchored=true hit.Parent["Right Leg"].Anchored=true hit.Parent["Left Arm"].Anchored=true hit.Parent["Right Arm"].Anchored=true script.Parent.Sound:Play() wait(5) hit.Parent.Humanoid.Health=0 end end script.Parent.Touched:connect(OnTouched) ---------------------------------------------------------- Output: Workspace.Part.Script.2:attempt to index a nil value stack begin Script 'Workspace.Part.Script', Line 2 stack end
Born2Script
#182512130Wednesday, January 27, 2016 7:51 PM GMT

function OnTouched(hit) if hit.Parent:FindFirstChild("Humanoid") then if game.Players:FindFirstChild(hit.Parent.Name).TeamColor==BrickColor.new("Navy blue") then else hit.Parent.Torso.Anchored=true hit.Parent.Head.Anchored=true hit.Parent["Left Leg"].Anchored=true hit.Parent["Right Leg"].Anchored=true hit.Parent["Left Arm"].Anchored=true hit.Parent["Right Arm"].Anchored=true script.Parent.Sound:Play() wait(5) hit.Parent.Humanoid.Health=0 end end end
antner777
#182512867Wednesday, January 27, 2016 8:06 PM GMT

zero, especially as a score in certain games. "they beat us three-nil" ^^^ Google magic! :D

    of     1