Answers for "roblox kill part"

0

roblox kill part

local part = script.Parent -- Find the part
part.Touched:Connect(function(hit) -- Connect the Touched function with the part, the hit is whatever touches the part
	if hit.Parent:FindFirstChild("Humanoid") then -- Only activate if hit is a Character
    	hit.Parent:FindFirstChild("Humanoid").Health = 0
   	end
end)
Posted by: Guest on April-21-2022

Browse Popular Code Answers by Language