Spawning Multiple Entities.

Whenever I use the following code, it will only create one entity using the first vector:
[lua]
local Canisters = {
Vector(-5714.232421875, -7911.0551757813, 70),
Vector(-7039.1655273438, -7534.3193359375, 70),
Vector(-7295.431640625, -5735.9267578125, 70),
};

local function SpawnCanisters ( )
for k, v in pairs(Canisters) do
Canister = ents.Create(“prop_physics”);
Canister:SetModel(“models/props_c17/canister02a.mdl”);
Canister:SetPos(v);
Canister:Freeze();
Canister:Spawn();
end;
end;
timer.Simple(1, SpawnCanisters);
[/lua]

Anyone have any idea how to make it spawn an entity for each vector in the table?

[LUA]
local Canisters = { Vector(-5714.232421875, -7911.0551757813, 70), Vector(-7039.1655273438, -7534.3193359375, 70), Vector(-7295.431640625, -5735.9267578125, 70), };

local function SpawnCanisters ( )
local Canister
for k, v in pairs(Canisters) do
Canister = ents.Create(“prop_physics”);
Canister:SetModel(“models/props_c17/canister02a.mdl”);
Canister:SetPos(v);
Canister:Spawn();
Canister:GetPhysicsObject():EnableMotion(false);
end;
end;
timer.Simple(1, SpawnCanisters);
[/LUA]

Hmm. It’s still only spawning one entity for me.

[LUA]
local Canisters = { Vector(-5714.232421875, -7911.0551757813, 70), Vector(-7039.1655273438, -7534.3193359375, 70), Vector(-7295.431640625, -5735.9267578125, 70), };

local function SpawnCanisters ( )
local Canister
for k, v in pairs(Canisters) do
Canister = ents.Create(“prop_physics”);
Canister:SetModel(“models/props_c17/canister02a.mdl”);
Canister:SetPos(v);
Canister:Spawn();
Canister:GetPhysicsObject():EnableMotion(false);
end;
end

concommand.Add(“SpawnCanisters”, SpawnCanisters)
[/LUA]

This is what I used to test it(On Flatgrass), it worked fine.

Ah I switched the order from:
[lua]
Canister:GetPhysicsObject():EnableMotion(false);
Canister:Spawn();
[/lua]

To:
[lua]
Canister:Spawn();
Canister:GetPhysicsObject():EnableMotion(false);
[/lua]

And it worked. Thanks for the help.