while true do() StarterMax = 10 sc = 0 function StarterLoop() if sc <= StarterMax then StarterPatchGrow() sc = sc + 1 print(sc) end end wait(1) end
function StarterPatchGrow() -- Starter Patch Generation math.randomseed(tick()) local _x = UnnamedModels:GetChildren() local x = _x[math.random(1,#_x-2)] local _y=x:GetChildren() local y = _y[math.random(1,#_y)] local Value = GetValue(y,"Unnamed") local RealModel = y:Clone() RealModel.Parent = StarterPatch.SpawnedPumpkins RealModel.Position = Vector3.new(math.random(StarterPatch.MinX.Value,StarterPatch.MaxX.Value),math.random(StarterPatch.MinY.Value,StarterPatch.MaxY.Value),math.random(StarterPatch.MinZ.Value,StarterPatch.MaxZ.Value)) local PumpkinLabel = game.ReplicatedStorage.LoadModels.UI.PumpkinLabel:Clone() PumpkinLabel.Adornee=RealModel PumpkinLabel.Parent=RealModel PumpkinLabel.Frame.Nickname.Text = 'Name : '..RealModel.Name PumpkinLabel.Frame.Rarity.Text = 'Rarity : '..x.Name PumpkinLabel.Frame.PumpkinValue.Text = 'Value : '..Value end
The loop will continue to print 1, anyone know why?
local sc = 0 while true do print(sc) sc = sc + 1 wait(1) end