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

Whats rong with this kill script?

name = "Humanoid" function OnTouched(hit) i = 0 Humanoid = hit.Parent:FindfirstChild("Humanoid") if Humanoid then hit.Parent:FindFirstChild("Humanod").Health = i end end

script.Parent.Touched:connect(OnTouched)


2 comments

0

In future, can you put your code into the code block.. Makes it easier to read

0

The output should have told you your spelling mistake, look there as well in future

1 answer

You spelled Humanoid wrong after the if statement ('Humanod'):

function onTouched(hit)
	local i = 0
	local humanoid = hit.Parent:FindFirstChild("Humanoid")
	
	if humanoid then
		humanoid.Health = 0
	end
end

script.Parent.Touched:connect(onTouched)

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