I'm trying to do something with .Touched, where if there is an object called "CBP" it prints "CBP", but if there isn't an object with "CBP" it prints "No CBP". When I try it out in game it doesnt work. The damage portion works, but not the printing portion.
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
hit.Parent.Humanoid:TakeDamage(1)
if hit.Parent.HumanoidRootPart:FindFirstChild("CBP") == false then
print("No CBP")
elseif hit.Parent.HumanoidRootPart:FindFirstChild("CBP") == true then
print("CBP")
end
end
end)
