trying to make a script that looks for "Break" inside Humanoid before printing "Hi", but it prints out nothing to the output. Any solutions?
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid"):FindFirstChild("Break") then print("hi") end end)
do this
script.Parent.Touched:Connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") local Break = humanoid:FindFirstChild("Break") if humanoid and Break then print("hi") end end)