#make a script for every part thats name is kill it will kill a player when that part is touched

44 messages · Page 1 of 1 (latest)

weak geyser
#

clone the script and find all descendants of workspace with name kill

sharp heron
#

the find descendants part idk how

weak geyser
#

got through all children, and if children.Name == kill then run it

sharp heron
#

could you just write one

frigid dirge
#

no

#

you can

#

you want the script

#

you gotta write it

sharp heron
#

what if idk how to

#

thats why i asked

frigid dirge
#

learn it instead of trying to have other people do it for you

sharp heron
#

im trying to learn right now and if you arent helping stop wasting my time

buoyant sphinxBOT
#

studio** You are now Level 4! **studio

frigid dirge
weak geyser
#

uh

frigid dirge
#

you are trying to control c control v

weak geyser
#

you can find going through all children online

#

and you can do cloned = script.Clone() over and over, and set cloned.parent to to the child gotten from the one above

sharp heron
#

ye but i tried combining them 2

#

and it didnt work

weak geyser
#

send please

sharp heron
#

k

#

for _, KillBrick in pairs:GetChildren() do

    KillBrick.Touched:Connect(function(touchPart)

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

        if humanoid then

            humanoid.Health = 0

        end
    end)
end```
weak geyser
#

hmm

weak geyser
#

and make it a normal kill scriot

sharp heron
#

then i would have to put it in all parts right

weak geyser
#

no

#

you would check if tyhe child gotten i named killpart

#

or whatever its named

sharp heron
#

idk how

weak geyser
#

search it online

sharp heron
#

ive already done that and also used chat gpt

#

people usually just put all the kill parts in one folder but my case is diffrent im loading in maps

#

with kill parts in it

#

and i just want 1 script for it all

weak geyser
#

chat gpt isnt good for full code

sharp heron
#

ye ik i figured

#

        for i, child in ipairs(Model) do
         if child:IsA("BasePart") then
          child:WaitForChild("Model"):WaitForChild("Part").Material = Enum.Material.Wood
       end
end```
#

how do i meak it search instead of a part but a folder

#

that is named KillParts

weak geyser
#

game.workspace.KillParts

sharp heron
#

k thx