Why is this while statement not doing the correct thing?
This while statement is doing the incorrect thing, it is giving me no errors, yet says that the children of the object are zero when that is not true.
Full code:
02 | local dispenser = script.Parent |
03 | local dispensingPosition = workspace.DoughDispenser.dispenserarea |
04 | local Holder = Instance.new( "Model" , game.Workspace.Containers) |
05 | Holder.Name = "DoughHolder" |
07 | local currentAmount = #workspace.Containers.DoughHolder:GetChildren() |
09 | while game.ServerStorage.DoughValue.Value > = 1 and currentAmount < = 2 do |
11 | game.ServerStorage.DoughValue.Value = game.ServerStorage.DoughValue.Value - 1 |
12 | local Copy = game.ServerStorage.DoughPart:Clone() |
13 | Copy.Parent = game.Workspace.Containers.DoughHolder |
14 | Copy.Position = dispensingPosition.Position |
15 | Copy.Velocity = Vector 3. new( 0 , 0 , 5 ) |
Problematic Code:
1 | and currentAmount < = 2 do |
Help?