function destroyBarriers(User)
if not User then return end
for tail = 1, User.Tail do
for depth = 1, User.Depth do
print('Down', tail, depth)
local Blocker = Blockers:FindFirstChild('World' .. tail .. '-' .. depth)
if Blocker then
print('Blocker found')
Blocker:Destroy()
end
end
end
end
Output
[1 2] -- SERVER
[Down 1 1] -- CLIENT
[Blocker found] -- CLIENT
[1 3] -- SERVER
[Down 1 1] -- CLIENT
[Down 1 2] -- CLIENT
[Blocker found] -- CLIENT
[2 1] -- SERVER
[Down 1 1] -- CLIENT
[Down 1 2] -- CLIENT
[Down 1 1] -- CLIENT
Basically the server output is print(User.Tail, User.Depth)
So the code finds World1-1 and World1-2 blockers, but can’t seem to find World2-1 blocker?
World2-1 does exist, and thus the code should be able to find it