#how do i make this cleaner

1 messages · Page 1 of 1 (latest)

remote kestrel
#
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

humanoid.Died:Connect(function()
    for i, v in pairs(character:GetChildren()) do
        if v:IsA("Part") then
            v.Color = Color3.new(0,0,0)
            if v.Name == "Torso" then
                for i, b in pairs(v:GetChildren()) do
                    if b:IsA("ParticleEmitter") or b:IsA("PointLight") then
                        b.Enabled = false
                    end
                end
            end
        end
    end
end)

#

it looks like yandere dev's code

gentle fulcrumBOT
#

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

low hound
vast anvil
#

Who's yandere dev?

valid tendon
#

pairs is useless tho

vast anvil
#

What's the difference between pairs and no pairs

valid tendon
#

the modified version of lua "luau" does not need it anymore

#

is just useless

vast anvil
#

Interesting

#

I'll keep that in mind, thanks

carmine grotto
carmine grotto
valid tendon
#

looping through all descendants may be less efficient

remote kestrel