only the first if works but if the first if doesnt work, it doesn't even check the rest of the elseifs please help me

killsafe.Changed:connect(function()
while killsafe.Value == true do
wait()
for _, v in pairs(script.Parent:GetChildren()) do 
if safe1.Value == false then 
if v:findFirstChild("ball") then
if v.ball.Parent.Name == part1.Name then
d1.Parent = v.ball.Parent
del.Value = true
print("safe")
end
end
-- SCRIPT DOESNT WORK AFTER THIS 
elseif safe2.Value == false then
if v:findFirstChild("ball") then
if v.ball.Parent.Name == part2.Name then
d1.Parent = v.ball.Parent
del.Value = true
print("safe")
end
end
elseif safe3.Value == false then
if v:findFirstChild("ball") then
if v.ball.Parent.Name == part3.Name then
d1.Parent = v.ball.Parent
del.Value = true
print("safe")
end
end
end	
end	
end
end)

2 comments

1

... what is this supposed to accomplish?

0

Set the value of safe1 to false or it will never continue to your elseif.