if L_148_ and (L_148_.Parent:FindFirstChild("Humanoid") or L_148_.Parent.Parent:FindFirstChild("Humanoid")) then
			if (L_148_.Parent:IsA("Hat") or L_148_.Parent:IsA("Accessory")) and L_148_.Parent.Parent:FindFirstChild("Humanoid") then
				if game.Players:FindFirstChild(L_148_.Parent.Parent.Name).TeamColor ~= L_2_.TeamColor then
					L_148_.Parent.Parent:FindFirstChild("Humanoid"):TakeDamage(L_12_.HeadDamage)
				elseif game.Players:FindFirstChild(L_148_.Parent.Parent.Name).TeamColor == L_2_.TeamColor then
					if L_12_.AntiTK == true then
						print("Cannot Damage")
					elseif L_12_.AntiTK == false then
						L_148_.Parent.Parent:FindFirstChild("Humanoid"):TakeDamage(L_12_.HeadDamage)
					end
				end
			elseif L_148_.Name == 'Head' and L_148_.Parent:FindFirstChild("Humanoid") then
				if game.Players:FindFirstChild(L_148_.Parent.Name).TeamColor ~= L_2_.TeamColor then
					L_148_.Parent:FindFirstChild("Humanoid"):TakeDamage(L_12_.HeadDamage)
				elseif game.Players:FindFirstChild(L_148_.Parent.Name).TeamColor == L_2_.TeamColor then
					if L_12_.AntiTK == true then
						print("Cannot Damage")
					elseif L_12_.AntiTK == false then
						L_148_.Parent:FindFirstChild("Humanoid"):TakeDamage(L_12_.HeadDamage)
					end
				end
			elseif L_148_.Name ~= 'Head' and L_148_.Parent:FindFirstChild("Humanoid") then
				if game.Players:FindFirstChild(L_148_.Parent.Name).TeamColor ~= L_2_.TeamColor then
					L_148_.Parent:FindFirstChild("Humanoid"):TakeDamage(L_12_.Damage)
				elseif game.Players:FindFirstChild(L_148_.Parent.Name).TeamColor == L_2_.TeamColor then
					if L_12_.AntiTK == true then
						print("Cannot Damage")
					elseif L_12_.AntiTK == false then
						L_148_.Parent:FindFirstChild("Humanoid"):TakeDamage(L_12_.Damage)
					end
				end
			end
			print(L_148_.Name .. " Hit")
		end

It will not work, AntiTK is false, and there isnt a team.

2 comments

0

DRY: Don't repeat yourself. Your code looks long and stuff, soooooo do something about it.

0

You need to describe your issue and the situation: Server/Localscript? FE enabled? Error message?!? Anything printed? Anything else that can help us?