function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = h.Health-100
end
end
script.Parent.Touched:connect(onTouched)
-- Put this in the part you want it to work in
-- Message me for anymore help #Muppet6931
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = h.Health-100
end
end
script.Parent.Touched:connect(onTouched)
-- Put this in the part you want it to work in
-- Message me for anymore help #Muppet6931
local killBrick = -- index your kill brick here
local function onTouched(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid == nil then return end
humanoid:TakeDamage(humanoid.MaxHealth)
-- doesn't kill if a ForceField is guarding the Character
end
killBrick.Touched:Connect(onTouched)
local killBrick = -- index your kill brick here
local function onTouched(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid == nil then return end
humanoid:TakeDamage(humanoid.MaxHealth)
-- doesn't kill if a ForceField is guarding the Character
end
killBrick.Touched:Connect(onTouched)
function kill(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
humanoid.Health = 0
end
end
script.Parent.Touched:connect(kill)
function kill(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
humanoid.Health = 0
end
end
script.Parent.Touched:connect(kill)