#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)
the find descendants part idk how
got through all children, and if children.Name == kill then run it
could you just write one
learn it instead of trying to have other people do it for you
im trying to learn right now and if you arent helping stop wasting my time
** You are now Level 4! **
you arent trying to learn
uh
you are trying to control c control v
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
send please
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```
hmm
try this
and make it a normal kill scriot
then i would have to put it in all parts right
i mean thats what i tried to do
idk how
search it online
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
chat gpt isnt good for full code
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
game.workspace.KillParts
k thx