User:Anaminus/Script:ShirtDoor

From Legacy Roblox Wiki
Revision as of 21:10, 5 July 2008 by >Anaminus
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Door = script.Parent 

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:FindFirstChild("Humanoid") 
	if (human ~= nil ) then
		if human.Parent.Torso.roblox.Texture == "http://www.roblox.com/asset/?version=1&id=#######" then --Replace ####### with shirt ID.
			Door.Transparency = 0.5 
			Door.CanCollide = false 
			wait(1) 
			Door.CanCollide = true 
			Door.Transparency = 0 
			print("Human touched door") 
		else
			human.Health = 0
		end

	end 
end 

connection = Door.Touched:connect(onTouched)