Im trying to code a spleef but All of part's are same name and I dont know how to code like that and If I do loop like i,v in pairs it lags really badly and I need help :C (laggy means that it doesnt debounce)
script:
--By enes223
local touchedParts = {}
while wait() do
spawn(function()
for _,v in pairs(script.Parent:GetChildren()) do
if not touchedParts[v] then
touchedParts[v] = true
v.Touched:connect(function()
for i = 0.1,1,0.1 do
v.Transparency = i
wait(0.01)
end
v.CanCollide = false
end)
end
end
end)
end

1 comment
what are you trying to do? create a touch event for each of the blocks?