Heres my code, it currently only moves like 6 guis and then stops
local Positions = script.Captcha.Limbo.Positions:GetChildren()
function findpos(key)
local chosenPosition = Positions[math.random(1, #Positions)]
if chosenPosition:FindFirstChild("occupied") == nil then
print("function ran")
local val = Instance.new("BoolValue")
val.Parent = chosenPosition
val.Name = "occupied"
game:GetService("Debris"):AddItem(val,0.5)
local String = chosenPosition.Value ---0,0,100,0
String = string.split(String, ",")
local Udim = UDim2.new(table.unpack(String))
game:GetService("TweenService"):Create(key, TweenInfo.new(0.5), {Position = Udim}):Play()
print("finished")
end
end
game.ReplicatedStorage:WaitForChild("Events"):WaitForChild("Captcha2").OnClientEvent:Connect(function()
script.Captcha.Limbo.Visible = true
task.wait(1)
task.spawn(function()
for i,v in pairs(script.Captcha.Limbo.keys:GetChildren()) do
findpos(v)
end
end)
end)
--local Positions = {
-- UDim2.new(0.639, 0,0.787, 0),
-- UDim2.new(0.33, 0,0.462, 0),
-- UDim2.new(0.33, 0,0.3, 0),
-- UDim2.new(0.33, 0,0.787, 0),
-- UDim2.new(0.639, 0,0.462, 0),
-- UDim2.new(0.639, 0,0.3, 0),
-- UDim2.new(0.639, 0,0.625, 0),
-- UDim2.new(0.33, 0,0.625, 0)
--}
anyone know why this might happen?