Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[?!?!?] How come my script won't print hi even when i have "Break" inside Humanoid?

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)

1 comment

0

Is break actually inside of the humanoid? And did you even touch the part?

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.