I nee d help scripting a killbrick
I got the script hope this helps :D im editing cuz i made a better one
--Vortex_Vasne's KillScript function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then humanoid.Health = 0 --set if you want to heal/kill end end script.Parent.Touched:connect(onTouch)
alright, i know someone has already posted, but ill do this in lua script so its easier to understand.
--This code is from roblox dev wiki. By flares! local Part = script.Parent local function onPartTouch(Part) local PartParent = Part.Parent local humanoid = PartParent:FindFirstChildWhichIsA("Humanoid") if humanoid then -- Set player's health to 0 humanoid.Health = 0 end end Part.Touched:Connect(onPartTouch)
hope you enjoy!