of     1   

Club24Hour
#139035719Wednesday, July 02, 2014 11:54 PM GMT

function onTouched(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) local name = player.TeamColor if script.Parent.brickColor == player.TeamColor then game.lighting.blocks:findFirstChild(name,true) if found then found.Value = found.Value+1 end
super10099
#139035891Wednesday, July 02, 2014 11:56 PM GMT

script.Parent.Touched:connect(onTouched) -- Assuming the script is inside a part
swimguy777
#139035927Wednesday, July 02, 2014 11:56 PM GMT

You never defined 'found' and Lighting needs to be capitalized -[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]
Club24Hour
#139036042Wednesday, July 02, 2014 11:57 PM GMT

I have the touched in there, and I dont capitalize lighting in other things. The error is, 18:56:53.505 - Workspace.Part.Script:4: attempt to index local 'player' (a nil value)
Club24Hour
#139036188Wednesday, July 02, 2014 11:59 PM GMT

and the 'found' is what I saw on wiki This looks in the Workspace for an object named "Brick". If found, it changes its name to "Foo": local found = Workspace:FindFirstChild("Brick") if found then found.Name = "Foo" end
excellentAnarchy
#139036206Wednesday, July 02, 2014 11:59 PM GMT

function requires an end, each 'if' requires an end, a function requires a connection line,
Club24Hour
#139036314Thursday, July 03, 2014 12:00 AM GMT

I have all that, I just didnt copy it. The error is 18:56:53.505 - Workspace.Part.Script:4: attempt to index local 'player' (a nil value)
swimguy777
#139036387Thursday, July 03, 2014 12:01 AM GMT

game.lighting.blocks:findFirstChild(name,true) You never defined 'found' here -[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]
mic144
#139037610Thursday, July 03, 2014 12:14 AM GMT

Club24Hour, I remember making that account.
Club24Hour
#139038730Thursday, July 03, 2014 12:26 AM GMT

lold ^

    of     1