diff --git a/demo/src/ServerScriptService/systems/mobs.luau b/demo/src/ServerScriptService/systems/mobs.luau index 34fbfd40..07b0d9ff 100644 --- a/demo/src/ServerScriptService/systems/mobs.luau +++ b/demo/src/ServerScriptService/systems/mobs.luau @@ -34,11 +34,11 @@ local moving_mobs = world local function mobsMove(dt: number) local targets = {} - for _, character in characters:iter() do + for _, character in characters do table.insert(targets, (character.PrimaryPart :: Part).Position) end - for mob, transform, v in moving_mobs:iter() do + for mob, transform, v in moving_mobs do local cf = transform.new local p = cf.Position diff --git a/demo/src/StarterPlayer/StarterPlayerScripts/systems/move.luau b/demo/src/StarterPlayer/StarterPlayerScripts/systems/move.luau index f9350b25..f0fc7108 100644 --- a/demo/src/StarterPlayer/StarterPlayerScripts/systems/move.luau +++ b/demo/src/StarterPlayer/StarterPlayerScripts/systems/move.luau @@ -11,7 +11,7 @@ local Transform = cts.Transform local moving_models = world:query(Transform, Model):cached() local function move(dt: number) - for _, transform, model in moving_models:iter() do + for _, transform, model in moving_models do local cf = transform.new if cf ~= transform.old then local part = model.PrimaryPart :: BasePart diff --git a/demo/src/StarterPlayer/StarterPlayerScripts/systems/test.luau b/demo/src/StarterPlayer/StarterPlayerScripts/systems/test.luau index 972b4bf8..250bbf1a 100644 --- a/demo/src/StarterPlayer/StarterPlayerScripts/systems/test.luau +++ b/demo/src/StarterPlayer/StarterPlayerScripts/systems/test.luau @@ -34,7 +34,7 @@ end local q = world:query(A, B, C, D):cached() local function cached() - for _ in q:iter() do + for _ in q do end end