#Kill Brick script not working

13 messages · Page 1 of 1 (latest)

low hedge
#

I tried making Kill brick with collection service from a tutorial but its not working

undone pier
#

show script not error

low hedge
#

Ok

#

local CollectionService = game:GetService("CollectionService")

for i, Part in CollectionService:GetTagged("KillBricks") do
Part.Touched:Connect(function(touchingPart)
local Humanoid = touchingPart.Parent
if Humanoid then
Humanoid.Health = 0
end
end)
end

undone pier
#

humanoid is an object inside player's character

low hedge
#

How do i add it in

undone pier
#

local Humanoid = touchPart.Parent:FindFirstChild("Humanoid")

low hedge
#

like that ?

#

Thanks it worked @undone pier

#

Im making a obby

#

what should i add

undone pier
undone pier