I really have no idea why its erroring..

for _,v in pairs(workspace:GetChildren()) do
		if v.ClassName == 'Model' and v.Name == 'Spawns' then
			for _,i in pairs(v:GetChildren()) do
				if i.ClassName == 'Part' then
					local h = i[math.random(1,i)]  -- Error here.
					plr.Character:MoveTo(Vector3.new(h))
				end
			end
		end
	end